Google Cloud Trigger

Google Cloud Trigger

Certified

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.

yaml
type: io.kestra.plugin.gcp.bigquery.Trigger

Wait for a sql query to return results and iterate through rows

yaml
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
Defaultfalse

Specifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.

DefaultNONE
Possible Values
STOREFETCHFETCH_ONENONE

Result handling mode

NONE by default. Use FETCH or STORE to expose rows to downstream tasks; supersedes deprecated flags.

DefaultPT1M
Formatduration

Polling interval

Duration between query runs; defaults to 60 seconds

Defaultfalse

Use legacy SQL

Default false; when true, runs the query with the legacy dialect

GCP project id

SubTypestring
Default["https://www.googleapis.com/auth/cloud-platform"]

GCP OAuth scopes

GCP service account key as JSON

SQL query

Rendered SQL string executed on each poll

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

List of execution states after which a trigger should be stopped (a.k.a. disabled).

Defaulttrue

A 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.

The destination table (if one) or the temporary table created automatically

Definitions
datasetstring

The dataset of the table

projectstring

The project of the table

tablestring

The table name

The job id

Map containing the first row of fetched data

Only populated if fetchType is FETCH_ONE.

SubTypeobject

List containing the fetched data

Only populated if fetchType is FETCH.

The size of the rows fetch

Formaturi

The uri of store result

Only populated if fetchType is STORE.