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.

有帮助吗?

解决方案

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top