DESCRIBE
DESCRIBE returns schema information about keyspaces, tables, and indexes in Lindorm CQL (Cassandra Query Language).
Supported variants
DESCRIBE KEYSPACES
DESCRIBE KEYSPACE [keyspace_name]
DESCRIBE TABLES
DESCRIBE TABLE table_name
DESCRIBE INDEX index_nameDESCRIBE KEYSPACES
Returns the names of all keyspaces.
Syntax
DESCRIBE KEYSPACESExample
DESCRIBE KEYSPACES;DESCRIBE KEYSPACE
Returns the structure of a keyspace and the status of all schema objects it contains, including tables, user-defined types (UDTs), and user-defined functions (UDFs).
Syntax
DESCRIBE KEYSPACE [keyspace_name]Parameters
| Parameter | Type | Description |
|---|---|---|
keyspace_name | text | The name of the keyspace. |
Ifkeyspace_nameis omitted, the command returns all schema objects in the current keyspace. If you include theONLYkeyword, only the DDL statement needed to recreate the keyspace is returned — tables and other objects are excluded.
Example
DESCRIBE KEYSPACE testks;DESCRIBE TABLES
Returns the names of all tables in a specified keyspace. If the specified keyspace does not exist, the names of all keyspaces are returned instead.
Syntax
DESCRIBE TABLESExample
DESCRIBE TABLES;DESCRIBE TABLE
Returns the schema of a table as a DDL statement that can be used to recreate it in Lindorm CQL.
Syntax
DESCRIBE TABLE table_nameParameters
| Parameter | Type | Description |
|---|---|---|
table_name | text | The name of the table. |
Example
DESCRIBE TABLE persioninfo;DESCRIBE INDEX
Returns the schema of a table index as a DDL statement that can be used to recreate it in Lindorm CQL.
Syntax
DESCRIBE INDEX index_nameParameters
| Parameter | Type | Description |
|---|---|---|
index_name | text | The index name. |
Example
DESCRIBE INDEX testks.myindex;