How to define dynamic column families in cassandra

前端 未结 2 799
太阳男子
太阳男子 2020-12-31 19:54

Here it is said, that no special effort is need to get a dynamic column family. But I always get an exception, when I try to set a value for an undefined column.

I c

相关标签:
2条回答
  • 2020-12-31 20:38

    CQL3 requires column metadata to exist. CQL3 is actually an abstraction over the underlying storage rows, so it's not a one-to-one. If you want to use dynamic column names (and there are lots of excellent use cases for them), use the traditional Thrift interface (via the client library of your choice). This will give you full control over what gets stored.

    0 讨论(0)
  • 2020-12-31 20:40

    CQL3 supports dynamic column family but you have to alter the table schema first

    ALTER TABLE places ADD website varchar;
    

    Check out the 1.2 documentation and CQL in depth slides

    0 讨论(0)
提交回复
热议问题