Execute queries to a Cassandra cluster with cqlsh.
Type:
bash
Name | Required | Description |
CQLSH_KEYSPACE | yes | The keyspace target |
CQLSH_HOST | yes | The host of the Cassandra cluster |
CQLSH_PORT | no | The Vault Token. Defaults to 9043 |
CQLSH_USER | no | The user to connect in the Cassandra cluster. |
CQLSH_PASSWD | no | The password to connect in the Cassandra cluster. |
Create a connection
shellhoop 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
Then it's possible to run queries into a Cassandra connection
shellhoop exec my-cqlsh-test -i 'SELECT * FROM table1;'