CQL3现在需要Cassandra的模式吗? [英] Does CQL3 require a schema for Cassandra now?
问题描述
我刚刚在过去一周里遇到了一个Cassandra的崩溃课程,从Thrift API到CQL,到Grokking SuperColumns学习我不应该使用他们和用户复合键。
我现在尝试CQL3,它似乎无法再插入到未在模式中定义的列,或看到 select * $我缺少一些选项在CQL3中启用此选项,或者它希望我定义模式中的每一列(取消宽,灵活的行的目的) ,imho)。
是的,CQL3需要在使用之前声明列。
但是,你可以做你想要的许多ALTER,没有锁定或性能命中。
也就是说,大多数地方,你在早期的C *版本中使用动态列更好地由C * 1.2中的地图提供。
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).
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.
这篇关于CQL3现在需要Cassandra的模式吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!