CQL3现在需要Cassandra的模式吗? [英] Does CQL3 require a schema for Cassandra now?

查看:286
本文介绍了CQL3现在需要Cassandra的模式吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚在过去一周里遇到了一个Cassandra的崩溃课程,从Thrift API到CQL,到Grokking SuperColumns学习我不应该使用他们和用户复合键。



我现在尝试CQL3,它似乎无法再插入到未在模式中定义的列,或看到 select *

解决方案

是的,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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆