Apache Cassandra Trigger

Apache Cassandra Trigger

Certified

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.

yaml
type: io.kestra.plugin.cassandra.astradb.Trigger

Wait for a CQL query to return results, and then iterate through rows.

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

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.

Definitions
clientId*Requiredstring

Client ID for Astra DB

clientSecret*Requiredstring

Client secret for Astra DB

keyspace*Requiredstring

Keyspace

Astra DB keyspace to connect to

proxyAddress

Astra DB cloud proxy address

Use only when the secure bundle is not provided.

hostname*Requiredstring
Min length1

Hostname of the Astra DB server

portintegerstring
Default9042

Port of the Astra DB server

secureBundlestring

Base64-encoded secure connect bundle

Supply the ZIP archive content encoded as base64. Use only when not configuring the proxy address.

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

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

DefaultPT1M
Formatduration

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.

SubTypestring
Possible Values
CREATEDSUBMITTEDRUNNINGPAUSEDRESTARTEDKILLINGSUCCESSWARNINGFAILEDKILLEDCANCELLEDQUEUEDRETRYINGRETRIEDSKIPPEDBREAKPOINTRESUBMITTED

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

Time zone id used to parse date/time values returned by the query

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 size of the binary response in bytes

Map containing the first row of fetched data

Only populated when fetchType is FETCH_ONE.

SubTypeobject

List of maps containing rows of fetched data

Only populated when fetchType is FETCH.

The size of the fetched rows

Only populated when fetchType is FETCH or STORE.

Formaturi

The URI of the result file on Kestra storage (.ion file / Amazon Ion text format)

Only populated when fetchType is STORE.