Trigger Trigger

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

Wait for a query to return results on Astra DB.

Examples

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

yaml
id: astra-trigger
namespace: io.kestra.tests
tasks:
  - id: each
    type: io.kestra.core.tasks.flows.EachSequential
    tasks:
      - id: return
        type: io.kestra.core.tasks.debugs.Return
        format: "{{ json(taskrun.value) }}"
    value: "{{ trigger.rows }}"

triggers:
  - id: watch
    type: io.kestra.plugin.astradb.Trigger
    interval: "PT5M"
    session:
        secureBundle: /path/to/secureBundle.zip
        keyspace: astradb_keyspace
        clientId: astradb_clientId
        clientSecret: astradb_clientSecret
    cql: "SELECT * FROM CQL_KEYSPACE.CQL_TABLE"
    fetch: true

Properties

cql

  • Type: string
  • Dynamic:
  • Required: ✔️

CQL query.

session

The session connection 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.000000000
  • 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.

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.

timeZoneId

  • Type: string
  • Dynamic:
  • Required:

Outputs

bytes

  • Type: integer
  • Dynamic:
  • Required:

The size of the binary response in bytes.

row

  • Type: object
  • Dynamic:
  • Required:

Map containing the first row of fetched data

Only populated if 'fetchOne' parameter is set to true.

rows

  • Type: array
  • SubType: object
  • Dynamic:
  • Required:

Lit of map containing rows of fetched data

Only populated if 'fetch' parameter is set to true.

size

  • Type: integer
  • Dynamic:
  • Required:

The size of the fetched rows

Only populated if 'store' or 'fetch' parameter is set to true.

uri

  • Type: string
  • Dynamic:
  • Required:
  • Format: uri

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

Only populated if 'store' is set to true.

Definitions

io.kestra.plugin.astradb.AstraDbSession-ProxyAddress

Properties

hostname
  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
  • Min length: 1

The hostname of the Astra DB server.

port
  • Type: integer
  • Dynamic:
  • Required: ✔️
  • Default: 9042

The port of the Astra DB server.

io.kestra.plugin.astradb.AstraDbSession

Properties

clientId
  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
clientSecret
  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
keyspace
  • Type: string
  • Dynamic: ✔️
  • Required: ✔️
proxyAddress

The Astra DB proxy address.

Use it only when you are not using the secure bundle.

secureBundle
  • Type: string
  • Dynamic: ✔️
  • Required:

The Astra DB secure bundle, base64 encoded.

It must be the ZIP archive containing the secure bundle encoded in base64. Use it only when you are not using the proxy address.