OK, so great news, it is now possible to do in CQL with the following
syntax, as per CASSANDRA-4179
CREATE TABLE foo (
host text,
service text,
metric int,
PRIMARY KEY ((host,service)));
(note the double parentheses).
This will effectively create a CF whose row key is a composite type.
Subject: CQL3 Compound Primary Keys - Do I have the right idea?
From: Adam Venturella aventure...@gmail.com
To: user@cassandra.apache.org
CC:
Trying to better grasp compound primary keys and what they are conceptually
doing under the hood. When you create a table
to look at the data
through Cassandra -cli which shows you how data is stored.
Thanks.
-Wei
Sent from my Samsung smartphone on ATT
Original message
Subject: CQL3 Compound Primary Keys - Do I have the right idea?
From: Adam Venturella aventure...@gmail.com
To: user
it is much clearer to look at the data
through Cassandra -cli which shows you how data is stored.
Thanks.
-Wei
Sent from my Samsung smartphone on ATT
Original message
Subject: CQL3 Compound Primary Keys - Do I have the right idea?
From: Adam Venturella aventure
Trying to better grasp compound primary keys and what they are conceptually
doing under the hood. When you create a table with a compound primary key
in cql3 (http://www.datastax.com/dev/blog/schema-in-cassandra-1-1) the
first part of the key is the partition key. I get that and the subsequent