I'm attempted to execute the following CQL 3 statement
CREATE TABLE summary (
id uuid,
"client" bigint,
"campaign" text,
"unit" bigint,
"view" counter,
PRIMARY KEY ("client", "campaign", "unit"));
The error I'm getting is that I cannot create a counter column on a non-counter column family.
Any ideas?
A counter is a special column for storing a number that is changed in increments. To load data into a counter column, or to increase or decrease the value of the counter, use the UPDATE command. Cassandra rejects USING TIMESTAMP or USING TTL in the command to update a counter column.
Cassandra allows 2 billion columns per row.
The solution to this issue is that any non-counter column must be part of the primary key. The column id uuid was the one causing the issue, removing it allowed the table to be created.
Tables that contain counters can only contain counters.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With