
Google Cloud Trigger
CertifiedWait for new changes in a Spanner database and trigger a flow execution
Google Cloud Trigger
Wait for new changes in a Spanner database and trigger a flow execution
Polls a Spanner Change Stream at the configured interval and triggers a downstream execution.
type: io.kestra.plugin.gcp.spanner.TriggerExamples
Trigger on database changes via Change Streams
id: spanner_change_trigger
namespace: company.team
triggers:
- id: on_changes
type: io.kestra.plugin.gcp.spanner.Trigger
projectId: "{{ secret('GCP_PROJECT_ID') }}"
instanceId: my-instance
databaseId: my-database
changeStreamName: my-change-stream
interval: PT1M
tasks:
- id: process
type: io.kestra.plugin.core.log.Log
message: "Change detected: {{ trigger.changeCount }} records modified"
Properties
changeStreamName *Requiredstring
The Change Stream name to poll
databaseId *Requiredstring
The Spanner database ID
instanceId *Requiredstring
The Spanner instance ID
projectId *Requiredstring
The GCP project ID
allowConcurrent Non-dynamicboolean
falseSpecifies whether a trigger is allowed to start a new execution even if a previous run is still in progress.
emulatorHost string
Spanner emulator host (host: port), for local testing only
When set, the trigger connects to a local Spanner emulator instead of the real Spanner service.
impersonatedServiceAccount string
The GCP service account to impersonate
interval Non-dynamicstring
PT1MdurationThe interval between polls
lookback string
Lookback window applied to poll stream records
Defaults to the polling interval if not specified.
scopes array
The GCP scopes to be used
serviceAccount string
The GCP service account
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
changeCount integer
Total number of data modification changes detected
rowCount integer
Total number of change records returned
uri string
uriThe URI of stored change records