Search code examples
cassandracql

unconfigured table error with Capitalized table name


All my Cassandra column family names are capitalized (like FunTable, SomeOtherTable, etc.) -- I'm switching from the Thrift API to CQL, and whenever I make a query (like SELECT * FROM FunTable) it fails with cassandra.InvalidRequest: Error from server: code=2200 [Invalid query] message="unconfigured table funtable"

What's going on?


Solution

  • It turns out, as I should have figured out from the table name being lower-cased in the error message, that CQL is case-insensitive, except inside quoted strings (similar to other SQL dialects). So the solution is just to put double quotes around the table name, like so: SELECT * FROM "FunTable"

    If you are specifying the keyspace, you need to put the quote just around the table name, not around the combination of keyspace and table name, e.g. SELECT * FROM good_keyspace."FunTable"