Search code examples
cassandracqlcql3

Does CQL3 require a schema for Cassandra now?


I've just had a crash course of Cassandra over the last week and went from Thrift API to CQL to grokking SuperColumns to learning I shouldn't use them and user Composite Keys instead.

I'm now trying out CQL3 and it would appear that I can no longer insert into columns that are not defined in the schema, or see those columns in a select *

Am I missing some option to enable this in CQL3 or does it expect me to define every column in the schema (defeating the purpose of wide, flexible rows, imho).


Solution

  • Yes, CQL3 does require columns to be declared before used.

    But, you can do as many ALTERs as you want, no locking or performance hit is entailed.

    That said, most of the places that you'd use "dynamic columns" in earlier C* versions are better served by a Map in C* 1.2.