python - How create valueless column In Cassandra By CQLEngine -
i have question how can create valueless column in cassandra cqlengine. mean want store information in column name instead of column value purpose. in cqlengine should define column name before run project in model file. help.
what asking traditionally accomplished using thrift api , wide rows, defining own column names. not how cql3 works. if want work way, can use pycassa, or can create columns compound keys.
for example, cql3:
create table ratings ( user_id uuid, item_id uuid, rating int, primary key (user_id, item_id));
you'd create wide row, user_id key, , columns have item_id, , rating value. compound primary keys, rows transposed columns.
you might want read this: http://brianoneill.blogspot.com/2012/09/composite-keys-connecting-dots-between.html
Comments
Post a Comment