cassandra - Using CompositeType getting error from client for insert -
i trying have column family can have key 1 cql row based on key , cql have list of keys using "in" keyword , have order clause. data getting column value not column name. issue having trying setup column family achieve this. have cli command create column family when go insert odd exception primary key. below cli , error when doing insert of column values after column family created.
the cli command used create column family:
create column family video_item_details key_validation_class = 'compositetype(integertype,utf8type)' , comparator = 'utf8type' , column_metadata = [ {column_name : key, validation_class: integertype, index_type: keys} {column_name : name, validation_class : 'utf8type', index_type: keys} {column_name : description, validation_class :'utf8type'} {column_name : url, validation_class : 'utf8type'} {column_name : play_time, validation_class : 'utf8type'} {column_name : type, validation_class : 'utf8type'} ] caching='all'; the error during insert is:
error while inserting com.datastax.driver.core.exceptions.invalidqueryexception: missing mandatory primary key part key2
the insert statement being attempted executed was:
insert video.video_item_details(key, name, description, url, play_time, type) values (1,'gettysburg','gettysburg movie trailer','test','2:53','streaming') thanks advice on how cassandra type of query.
best regards, -tony
the datastax java driver seem using supports only cql3 , me looks have defined table using thrift api. combining 2 lead issues one.
i've posted set of links on other so question covers differences between 2 interfaces.
Comments
Post a Comment