Cassandra Cheat Sheet
May 26, 2020 • 1 minute read

Logging into CQLSH

remote host

export CQLSH_HOST=<rpc address>
export CQLSH_PORT=9042
cqlsh -u cassandra
Password:
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
cqlsh> TRACING OFF;

Full CQL reference https://cassandra.apache.org/doc/latest/cql/index.html

Last update September 11, 2023
Cheat Sheet cassandra
Translation of this article: Українська
Do you have any questions?

Contact Me