CREATE TABLE json (id text PRIMARY KEY,int_map map<test,frozen<set< text>>> );
when I try to Insert
INSERT INTO json JSON '{"id": "11", "int_map":{ "string" : { "type": "string", "supported_filters":["equals","is_blank"]}}}';
I get
InvalidRequest: Error from server: code=2200 [Invalid query] message="Error decoding JSON value for int_map: Expected a list (representing a set), but got a LinkedHashMap: {type=string, supported_filters=[equals, is_blank]}"
I tried
CREATE TABLE jsontest1 (id text PRIMARY KEY,int_map map<text,frozen<LinkedHashMap<text>>> );
I get
SyntaxException: line 1:81 mismatched input '<' expecting '>' (...,int_map map<text,frozen<LinkedHashMap[<]text...)
CREATE TABLE jsontest (id text PRIMARY KEY,int_map LinkedHashMap<text,frozen<set< text>>> );
SyntaxException: line 1:64 mismatched input '<' expecting ')' (... text PRIMARY KEY,int_map LinkedHashMap[<]text...)
I have just started with cassandra, so don't have much idea about it.
how can I do it?
and is there any documentation which give the complete view about registering complex json apart from the mentioned one.
CREATE TYPE type1 (type text, supported_filters frozen<set<text>>);
CREATE TABLE tbl1 (id text PRIMARY KEY, my_col type1);
--
You received this message because you are subscribed to the Google Groups "DataStax Node.js Driver for Apache Cassandra Mailing List" group.
To unsubscribe from this group and stop receiving emails from it, send an email to nodejs-driver-user+unsub...@lists.datastax.com.