Insert query in cassandra -


here custom udt created in cassandra, i'm not able frame correct insert query udt.

create type if not exists 3 ( text, b text );

create type if not exists 2 ( c text, d frozen < list< frozen < 3 > > > );

create table if not exists 1 ( id text primary key, main frozen < 2 > );

the following insert query giving column type incompatible error in datastax dev centerinsert 1 (id, main) values ('something', [ { 'c' : 'something', 'three': [{'a':'something', 'b': 'something'}] } ]);

you might want try

insert 1 (id, main) values ('something', {            c : 'something',     d : [ {a:'something', b: 'something'}]     } ); 

you have gone wrong @ multiple places.

  1. definition of one doesn't have list.
  2. definition of two contains c,d - not c, three.
  3. please use c or "c" instead of 'c'

i hope try more before post on stack-overflow.


Comments