Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cassandra INSERT query Error

I'm getting an error with my Insert query in cassandra "ERROR: line 5:75 mismatched input '-02' expecting ')' (log_sid)"

My Query is:

   INSERT INTO table_name(account_sid, datetime_uuid, log_add_name, log_detail, log_post_back, log_post_front, log_price, log_request_type, log_sid) VALUES ('YTe9e7d2f82f2d88db31cfcafd9f4a7a2d', 2016-02-12 11:45:37, 'Birthday gft','{"Postcard_message":"","Postcard_size":"1001","Postcard_data":""}', 'pdf file google storage path1', 'pdf file google storage path2', 0.8750,'postcard', 'psc_5823b1cb9445335d');
like image 914
Aamir Avatar asked Aug 25 '26 19:08

Aamir


1 Answers

It seems like for log_detail you are using map and passing values in quotes'' which is incorrect.

Use something like below:

INSERT INTO post_log(account_sid, datetime_uuid, log_add_name, log_detail, log_post_back,
      log_post_front, log_price, log_request_type, log_sid)
    VALUES ('YTe9e7d2f82f2d88db31cfcafd9f4a7a2d', '2016-02-12 11:45:37','Birthday gft',
      {"Postcard_message":"","Postcard_size":"1001","Postcard_data":""},
      'https://storage.googleapis.com/m360103069/directmail/postcard/psc_5823b1cb9445335d_back.pdf',
      'https://storage.googleapis.com/m360-103069/directmail/postcard/psc_5823b1cb9445335d_front.pdf',
      '0.8750','postcard', 'psc_5823b1cb9445335d');
like image 108
Nitin Sali Avatar answered Aug 27 '26 09:08

Nitin Sali



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!