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

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`"
    fetch: true

Properties

conditions

  • Type: array
  • SubType: Condition
  • Dynamic:
  • Required:

List of conditions in order to limit the flow trigger.

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: 60
  • Format: duration

Interval between polling.

The interval between 2 different polls of schedule, this can avoid to overload the remote system with too many calls. For most of the triggers that depend on external systems, a minimal interval must be at least PT30S. See ISO_8601 Durations for more information of available interval values.

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

stopAfter

  • Type: array
  • SubType: string
  • Dynamic:
  • Required:

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

store

  • Type: boolean
  • Dynamic:
  • Required:
  • Default: false

Whether to store the data from the query result into an ion serialized data file

Outputs

destinationTable

jobId

  • Type: string
  • Required:

row

  • Type: object
  • Required:

rows

  • Type: array
  • SubType: object
  • Required:

size

  • Type: integer
  • Required:

uri

  • Type: string
  • Required:
  • Format: uri

Definitions

io.kestra.plugin.gcp.bigquery.Query-DestinationTable

  • dataset
    • Type: string
    • Dynamic:
    • Required:
  • project
    • Type: string
    • Dynamic:
    • Required:
  • table
    • Type: string
    • Dynamic:
    • Required: