How to retrieve the timestamp from cassandra?

BobDroid picture BobDroid · Apr 27, 2012 · Viewed 11.6k times · Source

In the below cassandra, "get result"..we can able to retrieve the column name and values. But how to retrieve the timestamp..Is there any better idea to get the values by using timestamp

[default@sample]get user[bob];                                        
=> (column=name, value=bobdroid, timestamp=1335361733545850)
=> (column=email, [email protected], timestamp=1335361733545850)
=> (column=age, value=23, timestamp=1335361733545850)
=> (column=password, value=MTIz, timestamp=1335361733545850)
Returned 4 results.
Elapsed time: 4 msec(s).

Answer

Peter Fales picture Peter Fales · Apr 11, 2014

Just ran across this thread, and found that the answer is out of date. CQL now exposes the internal timestamps using the writetime() function:

select key,columnfoo,writetime(columnfoo) from tablebar;