akshatha shetty
akshatha shetty

Reputation: 39

Insert query failing in cassandra when using now()

INSERT INTO testtable (id, user_name, gender, rank) VALUES (now(), 'test_user', 'MALE', 2) ;

Bad Request: line 1:60 no viable alternative at input 'now'

Can someone help on the above error message when trying to insert a timeuuid into a table in cassandra.

Upvotes: 0

Views: 132

Answers (1)

Richard
Richard

Reputation: 11100

You need to upgrade Cassandra - the timeuuid functions were added in Cassandra 1.2.2.

Upvotes: 2

Related Questions