DESCRIBE

DESCRIBE is a command that can be used to show the definition(s) for a particular object. Its command structure looks like this:

DESC[RIBE] (KEYSPACE|TABLE|TYPE|INDEX) <object_name>;

In putting it to use, you can quickly see that it can be used to view things such as full table options, keyspace replication, and index definitions.

The DESCRIBE command can be shortened to DESC.

Here, we will demonstrate using the DESC command on a table:

DESC TYPE customer_address;CREATE TYPE packt_ch3.customer_address ( type text, street text, city text, state text, postal_code text, country text, street2 text);

Likewise, the DESC command can be used to describe an INDEX:

DESC INDEX order_status_idx;CREATE INDEX order_status_idx ON packt_ch3.order_status_by_week ...

Get Mastering Apache Cassandra 3.x - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.