i trying update existing item in cassandra db using cqlsh:
$ > update allevents set "islastevent" = true "websiteid" = 'sd-8231' , "purchaser" = false , "currenttime" = '2016-04-06 13:06:11.534000';
and got this:
invalidrequest: code=2200 [invalid query] message="unable coerce '2016-04-06 13:06:11.534000' formatted date (long)"
in case can help:
$ > show version [cqlsh 5.0.1 | cassandra 3.0.2 | cql spec 3.3.1 | native protocol v4]
that's because cassandra timestamp types support milliseconds. currenttime
has precision. trim off last 3 zeros, , should work:
update allevents set "islastevent" = true "websiteid" = 'sd-8231' , "purchaser" = false , "currenttime" = '2016-04-06 13:06:11.534';
Comments
Post a Comment