create Composite-keyed Table with cassandra-cli

ぃ、小莉子 提交于 2019-12-11 19:42:36

问题


i want to use php for my project with phpcassa which doesn't support cql, so if I understood right I have to code cassandra commands like I would with cassandra-cli.

My question is how can I create a Composite-keyed Table or Dynamic Column Families like in this website, though not with cql but with cassandra-cli and where can I find more information about this language.


回答1:


create column family myColumnFamily
        with key_validation_class = 'CompositeType(UUIDType,UTF8Type)'
        and comparator = 'CompositeType(LongType,UTF8Type)'
        and default_validation_class = UTF8Type

The above command creates

  1. A column family named myColumnFamily
  2. With composite row key of type UUID:String
  3. With composite column name of type Long:String
  4. With value of type String


来源:https://stackoverflow.com/questions/18800983/create-composite-keyed-table-with-cassandra-cli

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!