What would be the exact CQL3 syntax to create a counter CF with composite row key and not predefined column names ?
Is the following supposed to work ?
CREATE TABLE composite_counter (
PRIMARY KEY (aid, key1, key2, key3)
First, when I do so I have no error shown, but I *can't* see this CF appear in my OpsCenter.
"update composite_counter set value = value + 5 where aid = '1' and key1 = 'test1' and key2 = 'test2' and key3 = 'test3';" works as expected too.
But how can I have multiple counter columns using the schemaless property of cassandra ? I mean before, when I created counter CF with cli, things like this used to work:
"update composite_counter set 'value2' = 'value2' + 5 where aid = '1' and key1 = 'test1' and key2 = 'test2' and key3 = 'test3';" => Bad Request: line 1:29 no viable alternative at input 'value2'
I also tried:
"update composite_counter set value2 = value2 + 5 where aid = '1' and key1 = 'test1' and key2 = 'test2' and key3 = 'test3';" => Bad Request: Unknown identifier value2 (as expected I guess)
I want to make a counter CF with composite keys and a lot of counters using this pattern "20130306#event" or "(20130306, event)", not sure if I should use composite columns there.
Is it mandatory to create the CF with at least one column with the "counter" type ? I mean I will probably never use a column named 'value', I defined it just to be sure the CF is defined as a counter CF.