
Apache Cassandra Trigger
CertifiedTrigger flow when Astra DB query returns data
Apache Cassandra Trigger
Trigger flow when Astra DB query returns data
Polls Astra DB at a fixed interval (default 60s) and launches a Flow once the CQL query returns at least one row. Use fetchType to control result handling; the NONE default does not fetch rows and the trigger will not fire.
type: io.kestra.plugin.cassandra.astradb.TriggerExamples
Wait for a CQL query to return results, and then iterate through rows.
id: astra_trigger
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: "{{ fromJson(taskrun.value) }}"
triggers:
- id: watch
type: io.kestra.plugin.cassandra.astradb.Trigger
interval: "PT5M"
session:
secureBundle: "{{ secret('ASTRADB_SECURE_BUNDLE') }}"
keyspace: astradb_keyspace
clientId: astradb_clientId
clientSecret: "{{ secret('ASTRADB_CLIENT_SECRET') }}"
cql: "SELECT * FROM CQL_KEYSPACE.CQL_TABLE"
fetchType: FETCH
Properties
cql *Requiredstring
CQL query
session *RequiredNon-dynamic
Astra DB session configuration
Required connection details (secure bundle or cloud proxy, keyspace, client credentials). Secure bundle and proxy are mutually exclusive; exactly one must be provided.
io.kestra.plugin.cassandra.astradb.AstraDbSession
Client ID for Astra DB
Client secret for Astra DB
Keyspace
Astra DB keyspace to connect to
Astra DB cloud proxy address
Use only when the secure bundle is not provided.
io.kestra.plugin.cassandra.astradb.AstraDbSession-ProxyAddress
1Hostname of the Astra DB server
9042Port of the Astra DB server
Base64-encoded secure connect bundle
Supply the ZIP archive content encoded as base64. Use only when not configuring the proxy address.
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_ONENONEThe way you want to store data
FETCH_ONE - output the first row. FETCH - output all rows as output variable. STORE - store all rows to a file. NONE - do nothing.
interval Non-dynamicstring
PT1MdurationInterval 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.
stopAfter Non-dynamicarray
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTEDList of execution states after which a trigger should be stopped (a.k.a. disabled).
timeZoneId Non-dynamicstring
Time zone id used to parse date/time values returned by the query
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
bytes integer
The size of the binary response in bytes
row object
Map containing the first row of fetched data
Only populated when fetchType is FETCH_ONE.
rows array
List of maps containing rows of fetched data
Only populated when fetchType is FETCH.
size integer
The size of the fetched rows
Only populated when fetchType is FETCH or STORE.
uri string
uriThe URI of the result file on Kestra storage (.ion file / Amazon Ion text format)
Only populated when fetchType is STORE.