Domanda

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.

È stato utile?

Soluzione

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

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

Altri suggerimenti

Double quotes is not allowed use only single quotes

SET foo[23]['Bar:12/User:15'] = 1;
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top