Reputation: 1599
Here is the custom UDT I created in cassandra, But I'm not able to frame correct insert query for the UDT.
CREATE TYPE IF NOT EXISTS three ( a text, b text );
CREATE TYPE IF NOT EXISTS two ( c text, d frozen < list< frozen < three > > > );
CREATE TABLE IF NOT EXISTS one ( id text PRIMARY KEY, main frozen < two > );
the following insert query is giving column type incompatible error in datastax dev centerinsert into one (id, main) values ('something',
[
{
'c' : 'something',
'three': [{'a':'something', 'b': 'something'}]
}
]);
Upvotes: 0
Views: 429
Reputation: 783
You might want to try
insert into one (id, main) values ('something', {
c : 'something',
d : [ {a:'something', b: 'something'}]
}
);
You have gone wrong at multiple places.
one
doesn't have a list.two
contains c,d - not c, three.c
or "c"
instead of 'c'
I hope you try more before you post it on stack-overflow.
Upvotes: 1