Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cassandra cqlsh DESCRIBE and USE not working

Have problem using DESCRIBE and USE

DESCRIBE <keyspace_name>

WARN: DESCRIBE|DESC was moved to server side in Cassandra 4.0. As a consequence DESCRIBE|DESC will not work in cqlsh '6.1.0' connected to Cassandra '3.11.5', the version that you are connected to. DESCRIBE does not exist server side prior Cassandra 4.0.

USE keyspace <keyspace_name>

Improper USE command

For more context, when connect to the cluster using

cqlsh <cassandra_cluster>

/usr/local/Cellar/cassandra/4.1.2/libexec/bin/cqlsh.py:473: DeprecationWarning: Legacy execution parameters will be removed in 4.0. Consider using execution profiles.

/usr/local/Cellar/cassandra/4.1.2/libexec/bin/cqlsh.py:503: DeprecationWarning: Setting the consistency level at the session level will be removed in 4.0. Consider using execution profiles and setting the desired consitency level to the EXEC_PROFILE_DEFAULT profile.

Cassandra installed using brew install cassandra

Commands used to works but not anymore.

like image 296
scarlett66 Avatar asked Sep 17 '25 05:09

scarlett66


2 Answers

So to me, it looks like you're using cqlsh 6.1 from Cassandra 4.1.2 to connect to Cassandra 3.11.5. What it's telling you is correct. cqlsh saw some big changes between Cassandra 3.11 and 4.1.

To get around this, use the version of cqlsh that came with Cassandra 3.11.5.

like image 133
Aaron Avatar answered Sep 19 '25 15:09

Aaron


For Cassandra versions >=4.0, you can use this command instead:

 SELECT table_name, keyspace_name FROM system_schema.tables;
like image 33
Allen Lin Avatar answered Sep 19 '25 14:09

Allen Lin