Details
-
Bug
-
Status: Open
-
Normal
-
Resolution: Unresolved
-
None
-
Code
-
Normal
-
Low Hanging Fruit
-
User Report
-
All
-
None
Description
Getting error:
cqlsh> COPY users.user_credentials_by_email FROM '/home/ubuntu/users.csv' WITH HEADER = FALSE AND NULL='null'; Using 3 child processes Starting copy of users.user_credentials_by_email with columns [email, la_duration]. Failed to make batch statement: Received an argument of invalid type for column "la_duration". Expected: <class 'cassandra.cqltypes.DurationType'>, Got: <type 'str'>; (DurationType arguments must be a Duration.)_ Failed to import 1 rows: TypeError - Received an argument of invalid type for column "la_duration". Expected: <class 'cassandra.cqltypes.DurationType'>, Got: <type 'str'>; (DurationType arguments must be a Duration.), given up without retries Failed to process 1 rows; failed rows written to import_users_user_credentials_by_email.err Processed: 1 rows; Rate: 2 rows/s; Avg. rate: 2 rows/s 0 rows imported from 1 files in 0.431 seconds (0 skipped).
To Reproduce:
CREATE KEYSPACE users WITH replication = {'class': 'SimpleStrategy', 'replication_factor' : 1 } AND durable_writes = true; CREATE TABLE users.user_credentials_by_email ( email text, la_duration duration, PRIMARY KEY(email) );
create users.csv file with:
LA@LA.com,8m26s482ms
Run:
COPY users.user_credentials_by_email FROM 'users.csv' WITH HEADER = FALSE AND NULL='null';
Attachments
Attachments
Issue Links
- is related to
-
CASSANDRA-11873 Add duration type
- Resolved