Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to list column families in keyspace?

Tags:

How can I get list of all column families in keyspace in Cassandra using CQL 3?

like image 484
newbie Avatar asked Mar 29 '14 17:03

newbie


People also ask

How do I get all column names in Cassandra?

To Select the data from Cassandra , Select statement is used. If you need to select all columns , you can use "*" or provide list of column names.

How do you define column family in Cassandra?

A Cassandra column family consists of a collection of ordered columns in rows which represent a structured version of the stored data. The keyspace holds these Cassandra column families and each keyspace has at least one column family.

How do I list Cassandra keyspaces?

Go to data tab > there you will see all keyspcaces created by you and some system keyspaces. You can see all tables under individual keyspaces and also replicator factor for keyspace.


1 Answers

Or even more simply (if you are using cqlsh), switch over to your keyspace with use and then execute describe tables:

cqlsh> use products; cqlsh:products> describe tables;  itemmaster    itemhierarchy         companyitemfavorites testtable 

Note: The describe command is specific to cqlsh only.

like image 51
Aaron Avatar answered Sep 18 '22 03:09

Aaron