
Apache Cassandra Query
CertifiedRun a CQL query on Cassandra
Apache Cassandra Query
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.
type: io.kestra.plugin.cassandra.standard.QueryExamples
Send a CQL query to a Cassandra database.
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 .crt file
truststorePassword: "{{ secret('TRUSTSTORE_PASSWORD') }}"
keystorePath: path to .jks file
keystorePassword: "{{ secret('KEYSTORE_PASSWORD') }}"
username: cassandra_user
password: "{{ secret('CASSANDRA_PASSWORD') }}"
cql: SELECT * FROM CQL_KEYSPACE.CQL_TABLE
fetchType: FETCH
Properties
cql *Requiredstring
CQL query to execute
session *RequiredNon-dynamic
Cassandra session configuration
Connection settings including endpoints, datacenter, auth, and optional TLS. Required to open the query session.
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
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.
pluginDefaultsRef Non-dynamicstring
Reference (ref) of the pluginDefaults to apply to this task.
Outputs
bytes integer
The size of the binary response in bytes
row object
Map containing the first row of fetched data
Only populated if 'fetchOne' parameter is set to true.
rows array
Lit of map containing rows of fetched data
Only populated if 'fetch' parameter is set to true.
size integer
The size of the fetched rows
Only populated if 'store' or 'fetch' parameter is set to true.
uri string
uriThe url of the result file on kestra storage (.ion file / Amazon Ion text format)
Only populated if 'store' is set to true.