DESCRIBE

Provides information about the connected Apache Cassandra cluster, or about the data objects stored in the cluster.

Provides information about the connected Apache Cassandra™ cluster, or about the data objects stored in the cluster.

Synopsis 

DESCRIBE FULL  CLUSTER | SCHEMA 
| KEYSPACES
|  KEYSPACE keyspace_name 
| TABLES
|  TABLE table_name 
| TYPES
|  TYPE user_defined_type 
| INDEX
|  INDEX index_name 
Legend
  • Uppercase means literal
  • Lowercase means not literal
  • Italics mean optional
  • The pipe (|) symbol means OR or AND/OR
  • Ellipsis (...) means repeatable

A semicolon that terminates CQL statements is not included in the synopsis.

Description 

The DESCRIBE or DESC command outputs information about the connected Cassandra cluster, or about the data stored on it. To query the system tables directly, use SELECT.

The keyspace and table name arguments are case-sensitive and need to match the upper or lowercase names stored internally. Use the DESCRIBE commands to list objects by their internal names. Use DESCRIBE FULL SCHEMA if you need the schema of system_* keyspaces.

DESCRIBE functions in the following ways:

DESCRIBE commands Example Description
DESCRIBE CLUSTER DESCRIBE CLUSTER; Output information about the connected Cassandra cluster. Cluster name, partitioner, and snitch are output. For non-system keyspace, the endpoint-range ownership information is also shown.
DESCRIBE KEYSPACES Output a list of all keyspace names.
DESCRIBE KEYSPACE <keyspace_name> DESCRIBE KEYSPACE cycling; Output CQL commands for the given keyspace. These CQL commands can be used to recreate the keyspace and tables.
DESCRIBE [FULL] SCHEMA   Output CQL commands for entire non-system keyspace and table schema. Use the FULL option to also include system keyspaces.
DESCRIBE TABLES   Output all tables in the current keyspace, or in all keyspaces if there is not current keyspace.
DESCRIBE TABLE <table_name> DESCRIBE TABLE upcoming_calendar; Output CQL commands for the given table. This CQL command can be used to recreate the table.
DESCRIBE INDEX <index_name> DESCRIBE INDEX team_entry; Output CQL command for the given index. This CQL command can be used to recreate the index.
DESCRIBE TYPES   Output list of all user-defined types in the current keyspace.
DESCRIBE TYPE <type_name> DESCRIBE TYPE basic_info; Output CQL command for the given user-defined type. This CQL command can be used to recreate the index.