Apache Cassandra Query

Apache Cassandra Query

Certified

Run a CQL query on Cassandra

Executes a CQL statement against Cassandra. Use fetchType to control result handling (FETCH, STORE, FETCH_ONE); NONE is the default and only records metrics.

yaml
type: io.kestra.plugin.cassandra.standard.Query

Send a CQL query to a Cassandra database.

yaml
id: cassandra_standard_query
namespace: company.team

tasks:
  - id: query
    type: io.kestra.plugin.cassandra.standard.Query
    session:
      endpoints:
        - hostname: localhost
      secureConnection:
        truststorePath: /path/to/truststore.jks
        truststorePassword: "{{ secret('TRUSTSTORE_PASSWORD') }}"
        keystorePath: /path/to/keystore.jks
        keystorePassword: "{{ secret('KEYSTORE_PASSWORD') }}"
      username: cassandra_user
      password: "{{ secret('CASSANDRA_PASSWORD') }}"
    cql: SELECT * FROM CQL_KEYSPACE.CQL_TABLE
    fetchType: FETCH
Properties

CQL query to execute

Cassandra session configuration

Connection settings including endpoints, datacenter, auth, and optional TLS. Required to open the query session.

Definitions
applicationNamestring

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

endpointsarray

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.

hostname*string
Min length1

Cassandra hostname

portintegerstring
Default9042

Cassandra port

Defaults to 9042.

serverNamestring

SNI server name

In the context of Cloud, this is the string representation of the host ID.

localDatacenterstring

Local datacenter name

Datacenter considered local by the load-balancing policy; recommended for multi-DC clusters.

passwordstring

Plaintext authentication password

secureConnection

Secure connection details

hostnameValidationbooleanstring
Defaulttrue

Verify the server hostname

Enabled by default. The node certificate must match the endpoint hostname in addition to chaining to the truststore. For endpoints with a server name, the proxy hostname is checked. Nodes discovered from the cluster metadata (everything except the endpoints you configure) are reached by IP address, so they are checked against their reverse DNS name, or their IP address when there is none. A multi-node cluster whose certificates carry neither the node hostnames nor IP address entries needs this set to false.

keystorePasswordstring

Password for the keystore file

keystorePathstring

Path to keystore file (JKS or PKCS12)

Only needed when the server requires client certificates (mutual TLS).

truststorePasswordstring

Password for the truststore file

truststorePathstring

Path to truststore file (JKS or PKCS12)

Required when secureConnection is set. The truststore holds the CA certificate that signed the server's certificate.

usernamestring

Plaintext authentication username

Assets this task consumes as inputs or produces as outputs, for lineage tracking and the asset graph (Enterprise Edition). A flow declaring this property on a task is rejected in the open-source edition.

Definitions
assetFailureBehaviorstring
Possible Values
IGNOREFAILWARN

Asset failure behavior

Behavior applied to the task state when a declared asset fails to render, emit, or be persisted (e.g. a lock conflict): FAIL escalates it to FAILED, WARN (default) warns it if it would otherwise succeed, IGNORE leaves the state untouched.

enableAutobooleanstring

Whether to auto-register assets referenced dynamically at runtime that are not statically declared in inputs or outputs.

inputsarray

The assets consumed as inputs.

id*string
Min length1
typestring
outputs

The assets produced as outputs.

id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*object
descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
id*string
Min length1
Max length150
type*string
Min length1

Custom asset type

descriptionstring
displayNamestring
metadataobject
Default{}
namespacestring
Min length1
Max length150
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.

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.