1

I am trying to implement an application using AWS Keyspace Cassandra and Cassandra Python driver. I had created 3 keyspaces in my AWS console.

I am trying to find if there is any query which can list down all the available tables in all 3 keyspaces in one go. I tried below query but it's failing.

SELECT table_name, keyspace_name from system_schema.tables where keyspace_name IN ('mykeyspace','cycling')

Does CQL editor in AWS Keyspace not allow use of IN keyword? Anybody knows such a query or command?

MikeJPR
  • 764
  • 3
  • 14
Shailendra
  • 33
  • 6

2 Answers2

2

It does allow us to use IN clause in Cassandra and even I am able to access the tables with the same query.

cassandra@cqlsh> SELECT table_name, keyspace_name from system_schema.tables where keyspace_name in ('system_traces','youkudbhelper');

table_name | keyspace_name ------------------------+---------------

(10 rows) cassandra@cqlsh> exit bash-4.2$ cqlsh --version cqlsh 5.0.1 bash-4.2$

References:

https://docs.datastax.com/en/cql-oss/3.3/cql/cql_using/useQueryIN.html

0

The below query works in Cassandra to list the available tables in different keyspaces.

SELECT table_name, keyspace_name from system_schema.tables where keyspace_name IN ('mykeyspace','cycling');

But it fails for AWS Keyspaces as IN keyword is not supported in AWS Keyspaces yet.

Shailendra
  • 33
  • 6