9 Cassandra Shell Commands – You Must Know
In this Cassandra tutorial, we will study about the Cassandra shell commands used in CQLSH. Along with this, we will discuss different Cassandra Shell Commands: Help, Version, Color, No color, Debug, Execute, File, U, and P with syntax and example.
So, let’s Start with Cassandra Shell Commands.
2. Cassandra Shell Commands
Cassandra shell commands basically manipulate the cqlsh prompt window. Apart from this, shell commands help the user to perform various operations and display various documentation. CQLSH provide with many shell commands.
This command is used to display the help documentation. Furthermore, this also helps the user to get a description of the cqlsh commands. The user can use ‘help’ keyword to perform the operation.
Do you know Major Difference & Similarities between HBase vs Cassandra
A Syntax of Help Command-
There are a lot of versions of Cassandra that are upgraded since the development of the technology. This command provides the version of cqlsh the user is using.
A Syntax of Version Command-
The user can use the colorful output for a better presentation. The user can use this command for the said purpose. To perform the operation ‘COLOR’ keyword can be used.
A Syntax of Color Command-
d. No Color
There might be a possibility that the user might want to change the color setting back to no color. For that, the user can use ‘NO COLOR’ keyword. This command directs cqlsh not to use colored output.
Let’s learn Cassandra Curd Operation – Create, Update, Read & Delete
A Syntax of No Color Command-
Debugging is detection and elimination of error in a code. CQLSH provides the user to show debugging information for a source code. The ‘DEBUG’ keyword is used to perform the said operation.
A Syntax of Debug Command-
CQLSH provides a command that executes a CQL command. The command first accepts the cql command. Then after accepting the command, it executes the command. ‘EXECUTE’ key word is used to perform the said operation. The CQL command is added to the ‘EXECUTE’ statement.
Do you know about Cassandra Troubleshooting
A Syntax of Execute Command-
CQLSH gives an advantage for the user to store the code in a file. That file can be executed using a SHELL COMMAND. This command lets the user to connect cqlsh with the file. ‘FILE’ keyword is used to perform the said operation in addition to the file name.
A Syntax of File Command-
Cassandra provides a special feature in which you can authenticate a user. The default name in Cassandra is ‘Cassandra’. Using ‘U’ keyword is used to assign a user.
Do You Know Why Cassandra Is So Popular?
A Syntax of U Command-
The user can assign a password to the authenticated user. Cassandra sets default password to be ‘Çassandra’. Using ‘P’ keyword user can set the password.
A Syntax of P Command-
So, this was all about Cassandra Shell Commands. Hope you like our explanation.
As a result, in this article, we get to know about Cassandra shell commands. In the next article, we will study the Documented Shell Commands. They are a bit similar, but the difference is of the documentation and the prompt window. Furthermore, If have any doubt, feel free to ask in the comment section.
Related Topic- Cassandra Architecture