create Composite-keyed Table with cassandra-cli

674 views Asked by At

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

There are 1 answers

0
doanduyhai On
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