Monday, June 14, 2021

Copying data to and from in Cassandra with 'COPY' command having 'timestamp' column

Issues: Using simple COPY command with out passing datatimeformat will cause wrong number of records.

Command: Use COPY command by passing datetimeformat

COPY table_name TO '/path/to/save/file.csv' with DATETIMEFORMAT = '%Y-%m-%d %H:%M:%S.%f%z';

Note: The timestamp uses strftime format.

***

No comments:

Post a Comment