I have this table
create table constants_values
(
key_name_1 text,
key_name_2 text,
values map<text, frozen<nav_tag_values>>,
PRIMARY KEY(key_name_1, key_name_2)
);
UDT:
CREATE TYPE ks_mobApp.nav_tag_values (
values set<text>
);
Here i am inserting values:
cqlsh:ks_mobapp> insert into constants_values(key_name_1,key_name_2,values)
values('Sell', 'Electronics', {{'Mobile', {values:{'Laptop'}}}});
and here is error:
InvalidRequest: code=2200 [Invalid query]
message="Invalid set literal for values of type map<text, nav_tag_values>"
What i am missing ?
Try this with cqlsh:
INSERT INTO constants_values(key_name_1,key_name_2,values)
VALUES('Sell', 'Electronics', {'Mobile': {value : ['Laptop']});
INSERT INTO constants_values(key_name_1,key_name_2,values) values('Sell', 'Electronics', {'Mobile': {values:{'Laptop'}}});
the key point is the : vs the , in your original statement.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With