[
https://issues.apache.org/jira/browse/CASSANDRA-16787?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ion Olaru updated CASSANDRA-16787:
----------------------------------
Description:
Getting error:
{code}
_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)._
{code}
*To Reproduce:*
{code}
CREATE KEYSPACE users WITH replication = \{'class': 'NetworkTopologyStrategy',
'datacenter1': '1'} AND durable_writes = true;
CREATE TABLE users.user_credentials_by_email (
email text,
la_duration duration,
PRIMARY KEY(email)
);
{code}
create users.csv file with:
{code}
[email protected],8m26s482ms
{code}
Run:
{code}
COPY users.user_credentials_by_email FROM '/home/automaton/users.csv' WITH
HEADER = FALSE AND NULL='null';
{code}
was:
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': 'NetworkTopologyStrategy',
'datacenter1': '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:
[email protected],8m26s482ms
Run:
COPY users.user_credentials_by_email FROM '/home/automaton/users.csv' WITH
HEADER = FALSE AND NULL='null';
> Copy from csv file with duration type fields fails to import
> ------------------------------------------------------------
>
> Key: CASSANDRA-16787
> URL: https://issues.apache.org/jira/browse/CASSANDRA-16787
> Project: Cassandra
> Issue Type: Bug
> Components: Tool/cqlsh
> Reporter: Brijesh Dungarakoti
> Assignee: Benjamin Lerer
> Priority: Normal
> Fix For: 4.0.1
>
> Attachments: error_cassandra_copy_from_1.JPG,
> error_cassandra_copy_from_2.JPG
>
>
> Getting error:
> {code}
> _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)._
> {code}
> *To Reproduce:*
> {code}
> CREATE KEYSPACE users WITH replication = \{'class':
> 'NetworkTopologyStrategy', 'datacenter1': '1'} AND durable_writes = true;
> CREATE TABLE users.user_credentials_by_email (
> email text,
> la_duration duration,
> PRIMARY KEY(email)
> );
> {code}
> create users.csv file with:
> {code}
> [email protected],8m26s482ms
> {code}
> Run:
> {code}
> COPY users.user_credentials_by_email FROM '/home/automaton/users.csv' WITH
> HEADER = FALSE AND NULL='null';
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]