Frage

I created a cassandra column family that looks like the following:

CREATE COLUMN FAMILY foo 
 WITH comparator= UTF8Type 
 AND key_validation_class=IntegerType
 AND column_metadata=[{column_name: bar_user_key, validation_class: UTF8Type}];

Attempting to create a new column with a value, I'm seeing the following syntax error:

[default@mykeyspace] SET foo[23]["Bar:12/User:15"] = "1";
Syntax error at position 31: unexpected """ for `SET foo[23]["Bar:12/User:15"] = "1";`.

Not sure what is going on here. Using Cassandra 1.2.

War es hilfreich?

Lösung

I believe you have to use single quotes with cassandra-cli.

SET foo[23]['Bar:12/User:15'] = '1';

Andere Tipps

Double quotes is not allowed use only single quotes

SET foo[23]['Bar:12/User:15'] = 1;
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top