cassandracassandra-cli

How to list all the available keyspaces in Cassandra?


I am newbie in Cassandra and trying to implement one toy application using Cassandra. I had created one keyspace and few column families in my Cassandra DB but I forgot the name of my cluster.

I am trying to find if there is any query which can list down all the available keyspaces.

Anybody knows such a query or command?


Solution

  • If you want to do this outside of the cqlsh tool you can query the schema_keyspaces table in the system keyspace. There's also a table called schema_columnfamilies which contains information about all tables.

    The DESCRIBE and SHOW commands only work in cqlsh and cassandra-cli.