
Google Cloud Trigger
CertifiedTrigger on BigQuery query results
Google Cloud Trigger
Trigger on BigQuery query results
Polls BigQuery every interval (default 60s) by running the rendered SQL. Starts a Flow execution when at least one row is returned and exposes query outputs (rows/size). Supports project/service account override and both standard and legacy SQL.
type: io.kestra.plugin.gcp.bigquery.TriggerExamples
Wait for a sql query to return results and iterate through rows
id: bigquery_listen
namespace: company.team
tasks:
- id: each
type: io.kestra.plugin.core.flow.ForEach
values: "{{ trigger.rows }}"
tasks:
- id: return
type: io.kestra.plugin.core.debug.Return
format: "{{ taskrun.value }}"
triggers:
- id: watch
type: io.kestra.plugin.gcp.bigquery.Trigger
interval: "PT5M"
sql: "SELECT * FROM `myproject.mydataset.mytable`"
fetchType: FETCH
Properties
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
fetchType string
NONESTOREFETCHFETCH_ONENONEResult handling mode
NONE by default. Use FETCH or STORE to expose rows to downstream tasks; supersedes deprecated flags.
interval Non-dynamicstring
PT1MdurationPolling interval
Duration between query runs; defaults to 60 seconds
legacySql booleanstring
falseUse legacy SQL
Default false; when true, runs the query with the legacy dialect
projectId string
GCP project id
scopes array
["https://www.googleapis.com/auth/cloud-platform"]GCP OAuth scopes
serviceAccount string
GCP service account key as JSON
sql string
SQL query
Rendered SQL string executed on each poll
stopAfter Non-dynamicarray
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
when string
trueA condition that determines whether the trigger should run.
A Pebble expression evaluated at trigger time. The trigger fires only when the expression evaluates to a truthy value (true, a non-empty string, a non-zero number). Use this to gate trigger execution on dynamic runtime values such as execution labels, flow variables, or environment conditions.
Outputs
destinationTable
The destination table (if one) or the temporary table created automatically
io.kestra.plugin.gcp.bigquery.Query-DestinationTable
The dataset of the table
The project of the table
The table name
jobId string
The job id
row object
Map containing the first row of fetched data
Only populated if fetchType is FETCH_ONE.
rows array
List containing the fetched data
Only populated if fetchType is FETCH.
size integer
The size of the rows fetch
uri string
uriThe uri of store result
Only populated if fetchType is STORE.