
Apache Cassandra Trigger
CertifiedTrigger flow when Cassandra query returns data
Apache Cassandra Trigger
Trigger flow when Cassandra query returns data
Polls Cassandra at a fixed interval (default 60s) and starts a Flow once the CQL query yields at least one row. Use fetchType to materialize results; the NONE default stores nothing and will not fire the trigger.
type: io.kestra.plugin.cassandra.standard.TriggerExamples
Wait for a CQL query to return results, and then iterate through rows.
id: cassandra_trigger
namespace: io.kestra.tests
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.standard.Trigger
interval: "PT5M"
session:
endpoints:
- hostname: localhost
username: cassandra_user
password: "{{ secret('CASSANDRA_PASSWORD') }}"
cql: "SELECT * FROM CQL_KEYSPACE.CQL_TABLE"
fetchType: FETCH
Properties
cql *Requiredstring
CQL query
session *RequiredNon-dynamic
Cassandra session configuration
Required connection details (endpoints, datacenter, auth, optional TLS) used to open the polling CqlSession.
io.kestra.plugin.cassandra.standard.CassandraDbSession
Application name sent in startup
It will be sent in the STARTUP protocol message, under the key APPLICATION_NAME, for each new connection established by the driver. Currently, this information is used by Insights monitoring (if the target cluster does not support Insights, the entry will be ignored by the server).
Contact endpoints for cluster bootstrap
List of hosts (and optional SNI names) used to open the initial connection. Port defaults to 9042 per endpoint unless overridden.
io.kestra.plugin.cassandra.standard.CassandraDbSession-Endpoint
1Cassandra hostname
9042Cassandra port
Defaults to 9042.
SNI server name
In the context of Cloud, this is the string representation of the host ID.
Local datacenter name
Datacenter considered local by the load-balancing policy; recommended for multi-DC clusters.
Plaintext authentication password
Secure connection details
io.kestra.plugin.cassandra.standard.CassandraDbSession-SecureConnection
Password for the keystore file
Path to keystore file (*.jks)
Password for the truststore file
Path to truststore file (.crt)
Plaintext authentication username
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.