Question

My goal is to move rows from one Cassandra 2.0 table to another with different primary key. To ensure data consistency I will need to insert them with original timestamps (USING TIMESTAMP). I planed to use COPY TO/COPY FROM or just COPY TO and custom import from CSV.

Is there a way to copy rows with timestamps? unixTimestampOf() on TimeUUID column doesn't work saying "Improper COPY command".

Thanks in advance.

Was it helpful?

Solution

It's impossible to do so using COPY TO/FROM. But it's possible to obtain a timestamp for a column using WRITETIME function

http://cassandra.apache.org/doc/cql3/CQL.html#selectSelection

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top