문제

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