Showing posts with label CQL. Show all posts
Showing posts with label CQL. Show all posts

Wednesday, September 25, 2013

Cassandra frequently used CQLs

Some of the commonly used Cassandra CQLs

1. List all the keyspaces in Cassandra
use system;
select * from schema_keyspaces;

2. List all the tables in a keyspace
use {keyspace_name};
describe tables;

3. How to dump CQL output on to a file
{cassandra_home}/bin/cqlsh -f cquery.txt > cquery.out

Link to an exhaustive list of CQL query examples
http://cassandra.apache.org/doc/cql/CQL.html

Below is the snip of how the CShell would look like