cassandracqlamazon-keyspaces

How to list the available tables in different keyspaces in Amazon Keyspaces/Cassandra?


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?


Solution

  • 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.