Pergunta

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.

Foi útil?

Solução

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

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

Outras dicas

Double quotes is not allowed use only single quotes

SET foo[23]['Bar:12/User:15'] = 1;
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top