Cassandra 插入查询错误

Cassandra INSERT query Error

我在 cassandra 中插入查询时遇到错误 "ERROR: line 5:75 mismatched input '-02' expecting ')' (log_sid)"

我的查询是:

   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');

检查此代码可能对您有所帮助

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');

似乎 log_detail 您正在使用地图并在引号中传递值,这是不正确的。

使用如下内容:

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');