Trigger
type: "io.kestra.plugin.gcp.bigquery.Trigger"
Wait for query on BigQuery
# Examples
Wait for a sql query to return results and iterate through rows
id: bigquery-listen
namespace: io.kestra.tests
tasks:
- id: each
type: io.kestra.core.tasks.flows.EachSequential
tasks:
- id: return
type: io.kestra.core.tasks.debugs.Return
format: "{{json taskrun.value}}"
value: "{{ trigger.rows }}"
triggers:
- id: watch
type: io.kestra.plugin.gcp.bigquery.Trigger
interval: "PT5M"
sql: "SELECT * FROM `myproject.mydataset.mytable`"
# Properties
# fetch
- Type: boolean
- Dynamic: ❓
- Required: ❌
- Default:
false
Whether to Fetch the data from the query result to the task output
# fetchOne
- Type: boolean
- Dynamic: ❓
- Required: ❌
- Default:
false
Whether to Fetch only one data row from the query result to the task output
# interval
- Type: string
- Dynamic: ❓
- Required: ❌
- Default:
PT1S
- Format:
duration
Interval between polling
The interval between 2 different test of schedule, this can avoid to overload the remote system with too many call. For most of trigger that depend on external system, a minimal interval must be at least PT30S.
See ISO_8601 Durations (opens new window) for more information of available interval value
# legacySql
- Type: boolean
- Dynamic: ❓
- Required: ❌
- Default:
false
Whether to use BigQuery's legacy SQL dialect for this query
By default this property is set to false.
# projectId
- Type: string
- Dynamic: ❓
- Required: ❌
# scopes
- Type: array
- SubType: string
- Dynamic: ❓
- Required: ❌
- Default:
[https://www.googleapis.com/auth/cloud-platform]
# serviceAccount
- Type: string
- Dynamic: ❓
- Required: ❌
# sql
- Type: string
- Dynamic: ❓
- Required: ❌
The sql query to run
# store
- Type: boolean
- Dynamic: ❓
- Required: ❌
- Default:
false
Whether to store the data from the query result into an ion serialized data file
# Outputs
# destinationTable
- Type: DestinationTable
The destination table (if one) or the temporary table created automatically
# jobId
- Type: string
The job id
# row
- Type: object
Map containing the first row of fetched data
Only populated if 'fetchOne' parameter is set to true.
# rows
- Type: array
- SubType: object
List containing the fetched data
Only populated if 'fetch' parameter is set to true.
# size
- Type: integer
The size of the rows fetch
# uri
- Type: string
The uri of store result
Only populated if 'store' is set to true.
# Definitions
# DestinationTable
# dataset
- Type: string
- Dynamic: ❓
- Required: ❌
The dataset of the table
# project
- Type: string
- Dynamic: ❓
- Required: ❌
The project of the table
# table
- Type: string
- Dynamic: ❓
- Required: ❌
The table name