Prerequisites

To get the most out of this guide, you will need to:

Configuration

NameRequiredDescription
CQLSH_KEYSPACEyesThe keyspace target
CQLSH_HOSTyesThe host of the Cassandra cluster
CQLSH_PORTnoThe Vault Token. Defaults to 9043
CQLSH_USERnoThe user can connect in the Cassandra cluster.
CQLSH_PASSWDnoThe password to connect in the Cassandra cluster.

Create a connection

hoop admin create conn my-cqlsh-test -a <agent> \
  -e CQLSH_KEYSPACE=<keyspace> \
  -e CQLSH_HOST=<host> \
  -e CQLSH_USER=<user> \
  -e CQLSH_PASSWD=<user> \
 -- cqlsh

Examples

Then, it’s possible to run queries into a Cassandra connection.

hoop exec my-cqlsh-test -i 'SELECT * FROM table1;'