Cassandra Cheat sheet
May 26, 2020 • 0 minutes read

Logging into CQLSH

remote host

export CQLSH_HOST=<rpc address>
export CQLSH_PORT=9042
cqlsh -u cassandra
cqlsh> exit

from localhost

cqlsh localhost
cqlsh> exit

show info about cluster

cqlsh> DESCRIBE cluster;

show list of keyspaces

cqlsh> DESCRIBE keyspaces;

use keyspacename and show available tables

cqlsh> use keyspacename;
cqlsh:keyspacename> describe tables;

show details about tablename structure

cqlsh:keyspacename>describe tablename;

get details about query execution

cqlsh> TRACING ON;
cqlsh>//run cql query here

Full CQL reference

Last update January 7, 2023
Cheat Sheet cassandra