I'm really a beginner in Cassandra stuff. I need to use some SELECT result in my INSERT. Something like this:
insert into  data_tbl
  (value_type, time, value, key_id) 
values
  (
   'test1', 
   now(), 
   'my first value',
   (select key_id from keys where key='123') 
  );
Is it possible ?
As far as I know, you would need to do this programmatically in your application. First do the select on the keys table, then as you read each row from the result set in a loop, do an insert into your data_tbl.
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