Cassandra CLI/CQL Commands
After creating a keyspace, column families and columns for data, you can connect to them and perform management operations through the Storage Server management console UI. Additionally you can also connect to Cassandra using clients such as Cassandra-CLI and CQL client. Â
Cassandra CLI
This cassandra-cli script is shipped with Storage Server. You can find it at <SS_HOME>/bin
.
This guide gives you some of the common CLI operations used to connect to and query data in Cassandra clusters.Â
CQL
For this, you can use Database Explorer in Tools.Â
- Before you start using Database Explorer for Cassandra you have to download and copy Cassandra JDBC driver to
<SS_HOME>/repository/components/lib
. - Go to Tools > Database Explorer and log in with the following information.
- Driver Class:Â org.apache.cassandra.cql.jdbc.CassandraDriver
- JDBC URL:Â jdbc:cassandra://localhost:9160
- User Name: <User_Name>
- Password: <Password>
- The following window appears.
You may not be able to access data of column families which are created through Cassandra-CLI, Carbon UI or any other Thrift clients when using CQL. However, you can do that by making a small change (which is introducing a primary key) to the column family (i.e. CQL table). See here for more information.