Query:
CREATE TABLE IF NOT EXISTS "TEMP_tmp".temp (
"Date_Time" timestamp,
PRIMARY KEY ("Date_Time")
);
CSV Contains "13/01/09 23:13" values.
Error : Failed to import 1 rows: ParseError - Failed to parse 13/01/09 23:13 : invalid literal for long() with base 10: '13/01/09 23:13', given up without retries.
What Data Type should I Use ?
Default Cqlsh timestamp format is : year-month-day hour:min:sec+timezone
Example :
You either change your date format to above or you can change the format from cqlshrc file
Check this answer custom cassandra / cqlsh time_format
cassandra will store
timestamp
as2017-02-01 08:28:21+0000
. For example, if I store atimestamp
in your described table"TEMP_tmp".temp
:If we copy all the data to
csv
:temp.csv
will contain:If we
truncate
the table:Then if we import
temp.csv
:If you want custom date/time format, then follow Ashraful Islam's answer from your question.