I'm following Cassandra docs to learn CQL but when I type the query SELECT * from system.schema_keyspaces; the system generates InvalidRequest: code=2200 [Invalid query] message= unconfigured table system.schema_keyspaces. Although I'm able to execute another quires like create, update..etc.

The issue you are having here, is that you are using docs to explore Cassandra that are for version 2.0 and 2.1. My guess is that you are probably using Cassandra 3.0. In that case, you will need to query the system_schema keyspace for the "keyspaces" table:

cassandra@cqlsh:system_schema> SELECT * FROM system_schema.keyspaces;

 keyspace_name      | durable_writes | replication
--------------------+----------------+----------------------------------------------------------------------------------------
               test |           True | {'PowerWindows': '1', 'class': 'org.apache.cassandra.locator.NetworkTopologyStrategy'}
        system_auth |           True |    {'class': 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '1'}
      system_schema |           True |                                {'class': 'org.apache.cassandra.locator.LocalStrategy'}
 system_distributed |           True |    {'class': 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '3'}
             system |           True |                                {'class': 'org.apache.cassandra.locator.LocalStrategy'}
      system_traces |           True |    {'class': 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor': '2'}

(6 rows)

Cassandra underwent a major storage engine rewrite for 3.0+, so much of the schema interactions are different as of that version. In the future, be sure to double-check valid documentation versions with your local Cassandra version. From cqlsh, you can query that:

cassandra@cqlsh:system_schema> SELECT release_version from system.local;

 release_version
-----------------
             3.4

(1 rows)
  • 1
    @JimmyJanson if it helps upvote, accept!!! – user52045 Jan 7 '17 at 10:24

Your Answer

 
discard

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.