Query Query

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

Query an Astra DB database with CQL.

Examples

Send a CQL query to an Astra DB database

yaml
id: "query"
type: "io.kestra.plugin.astradb.Query"
session:
  secureBundle: /path/to/secureBundle.zip
  keyspace: astradb_keyspace
  clientId: astradb_clientId
  clientSecret: astradb_clientSecret
cql: SELECT * FROM CQL_TABLE

Properties

cql

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

CQL query to execute

session

The session connection properties

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

store

  • Type: boolean
  • Dynamic:
  • Required:
  • Default: false

Whether to store the data from the query result into an ion serialized data file

Outputs

bytes

  • Type: integer

The size of the binary response in bytes.

row

  • Type: object

Map containing the first row of fetched data

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

rows

  • Type: array
  • SubType: object

Lit of map containing rows of fetched data

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

size

  • Type: integer

The size of the fetched rows

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

uri

  • Type: string

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

Only populated if 'store' is set to true.

Definitions

ProxyAddress

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

AstraDbSession

clientId

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

clientSecret

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

keyspace

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

proxyAddress

The Astra DB proxy address

Use it only if 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 if not using the proxy address.