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

Popular posts from this blog

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -