Provides information about the connected Cassandra cluster, or about the data objects stored in the cluster.
DESCRIBE CLUSTER | SCHEMA
| KEYSPACE [<keyspace_name>]
| COLUMNFAMILIES
| COLUMNFAMILY <columnfamily_name>
The various forms of the DESCRIBE or DESC command yield information about the currently connected Cassandra cluster and the data objects (keyspaces and column families) stored in the cluster:
Describe a cluster
DESCRIBE CLUSTER;
Sample output is:
Cluster: Test Cluster
Partitioner: RandomPartitioner
Snitch: com.datastax.bdp.snitch.DseDelegateSnitch
Describe a keyspace
CREATE KEYSPACE Excelsior WITH strategy_class = 'SimpleStrategy'
AND strategy_options:replication_factor = 1;
DESCRIBE KEYSPACE Excelsior;
Sample output is:
CREATE KEYSPACE Excelsior WITH strategy_class = 'SimpleStrategy'
AND strategy_options:replication_factor = '1';
Describe a column family
Use Excelsior;
CREATE COLUMNFAMILY users (
KEY uuid PRIMARY KEY,
username text,
email text )
WITH comment='user information'
AND read_repair_chance = 1.0;
DESCRIBE COLUMNFAMILY users;
Sample output is:
CREATE COLUMNFAMILY users (
KEY uuid PRIMARY KEY,
email text,
username text
) WITH
comment='user information' AND
comparator=text AND
read_repair_chance=1.000000 AND
gc_grace_seconds=864000 AND
default_validation=text AND
min_compaction_threshold=4 AND
max_compaction_threshold=32 AND
replicate_on_write=True;