10 Cassandra Documented Shell Commands | CQL Shell Commands

1. Objective

In the last Cassandra tutorial, we studied Cassandra Data Models, now we are going to learn about top 10 Cassandra Documented Shell Commands or CQL Shell Commands: help, capture, copy, describe, expand, show, tracing, paging, source, and exit with syntax.
So, let’s explore Cassandra Documented Shell Commands.

10 Cassandra Documented Shell Commands | CQL Shell Commands

10 Cassandra Documented Shell Commands | CQL Shell Commands

2. Cassandra Documented Shell Commands

There are many documented shell commands in Cassandra. Cassandra Documented Shell commands help the user to get documentation on the topic. These documents help the user to know and troubleshoot their query. Apart from this, these are simple commands used to do some specific tasks. There are many documented shell commands in CQLSH. They are:

Test your knowledge how much you know about Cassandra

a. Help

Help command allows the user to access help for all the other commands. In other words, it describes and explains all the other cqlsh commands. When this command is executed, a bunch of topics is displayed in a window. This contains a description and helps for all cqlsh commands.
A Syntax of Help Command-

cqlsh:keyspace>HELP

b. Capture

There may be times when a user wants to store the output in a file. Capture command lets the user do so. It allows the latest output of a command to be captured, and then this captured output is then added to a new file.
A Syntax of Capture Command-

cqlsh:keyspace>CAPTURE

Do you know about Cassandra Cluster

c. Consistency

When consistency command is executed the user gets the information about the consistency level. A user can know current consistency level. Apart from this, a user can also set a new consistency.
A Syntax of Consistency Command-

cqlsh:keyspace> CONSISTENCY

d. Copy

The user may sometimes want to copy data. This Copy Command lets the user to either copy data from Cassandra to other files. Apart from this, it also allows the user to copy data from other places to Cassandra.

A Syntax of Copy Command-

cqlsh:keyspace> COPY

Let’s take a tour to Cassandra Troubleshooting

e. Describe

Describe Command is widely used for verification. A user can verify all the data using this command. Along with proper syntax, this command displays the data stored in the data types. These data types can be collection data type or user-defined data type or simple data type as well. This command describes the cluster of Cassandra and its objects.

A Syntax of Describe Command-

cqlsh:keyspace> DESCRIBE

Let’s discuss Important Features of Cassandra

f. Expand

This command expands the output. After the execution of the command, the output of the query is expanded vertically. Using Expand command, the user can look into the details of the output.

A Syntax of Expand Command-

cqlsh:keyspace> EXPAND

g. Show

There are a lot of details or description about Cassandra or cqlsh. Show command helps the user to display such details. These details include Cassandra version, host, data type assumption etc.

A Syntax of Show Command-

cqlsh:keyspace> SHOW

You must read about Cassandra API

h. Tracing

This is a simple command which user uses to enable or disable request tracing.

A Syntax of Tracing Command-

cqlsh:keyspace> TRACING

i. Paging

This is a simple command which user uses to enable or disable query paging.
A Syntax of Paging Command-

cqlsh:keyspace> PAGING

j. Source

Source command allows the user to execute source files. These files contain CQL statements. Using this command, the user automatically connects the cqlsh with the file. After this connection, the file is automatically executed.
A Syntax of Source Command-

cqlsh:keyspace> SOURCE

Let’s read about Cassandra Architecture in detail

k. Exit

This is a simple command that terminates cqlsh. In other words, this commands exits the user from the window.
A Syntax of Exit Command-

cqlsh:keyspace> EXIT

So, this was all about Cassandra Documented Shell Commands Tutorial. Hope you like our explanation.

Do you know about Cassandra Monitoring Tools

3. Conclusion

Hence, In this Cassandra Documented Shell Commands tutorial, we got to know about the CQLSH Commands: Exit Command, Source Command, Paging Command, Tracing Command, Show-Command, Expand Command, Describe Command, Copy Command, Consistency Command, Capture Command, and Help Command with syntax. Furthermore, if you have any query regarding Cassandra Documented Shell Commands, Feel free to ask in the comment section. 

Related Topic- Why Cassandra Is So Popular?

For reference 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.