Hi guys,

we are making a simple tool which allows us to transform table
via COPY TO -> drop table -> transform schema/data -> create table -> COPY
FROM.

It works well in most cases, but we have problem with loading of counter
columns, it fails with "ParseError - argument for 's' must be a string,
 given up without retries.".
It works well if the same column is defined as int.

Are we doing something wrong or encountered C* error?


Thanks,

Jaroslav



[/tmp]$ echo
"EVT:be3bd2d0-a68d-11e6-90d4-1b2a65b8a28a,f7ce3ac0-a66e-11e6-b58e-4e29450fd577,SA,2"
> data.csv
[/tmp]$ cqlsh
Connected to WOC at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.10-SNAPSHOT | CQL spec 3.4.3 | Native protocol
v4]
Use HELP for help.
cqlsh> CREATE TABLE woc.table_test (
   ... object_id ascii,
   ... user_id timeuuid,
   ... counter_id ascii,
   ... count counter,
   ... PRIMARY KEY ((object_id, user_id), counter_id)
   ... );
cqlsh>quit;
[/tmp]$ cqlsh -e "copy woc.table_test(object_id, user_id, counter_id,
count) from 'data.csv';"
Using 7 child processes

Starting copy of woc.table_test with columns [object_id, user_id,
counter_id, count].
<stdin>:1:Failed to import 1 rows: ParseError - argument for 's' must be a
string,  given up without retries
<stdin>:1:Failed to process 1 rows; failed rows written to
import_woc_table_test.err
Processed: 1 rows; Rate:       1 rows/s; Avg. rate:       2 rows/s
1 rows imported from 1 files in 0.560 seconds (0 skipped).
[/tmp]$
[/tmp]$
[/tmp]$
[/tmp]$
[/tmp]$ cqlsh
Connected to WOC at 127.0.0.1:9042.
[cqlsh 5.0.1 | Cassandra 3.10-SNAPSHOT | CQL spec 3.4.3 | Native protocol
v4]
Use HELP for help.
cqlsh> drop table woc.table_test;
cqlsh>
cqlsh> CREATE TABLE woc.table_test (
   ... object_id ascii,
   ... user_id timeuuid,
   ... counter_id ascii,
   ... count int,
   ... PRIMARY KEY ((object_id, user_id), counter_id));
cqlsh>quit;
[/tmp]$ cqlsh -e "copy woc.table_test(object_id, user_id, counter_id,
count) from 'data.csv';"
Using 7 child processes

Starting copy of woc.table_test with columns [object_id, user_id,
counter_id, count].
Processed: 1 rows; Rate:       1 rows/s; Avg. rate:       2 rows/s
1 rows imported from 1 files in 0.652 seconds (0 skipped).
[/tmp]$





//////// data

echo
"EVT:be3bd2d0-a68d-11e6-90d4-1b2a65b8a28a,f7ce3ac0-a66e-11e6-b58e-4e29450fd577,SA,2"
> data.csv


//////// table definitions, first one is with counter column, second with
int column


CREATE TABLE woc.table_test (
object_id ascii,
user_id timeuuid,
counter_id ascii,
count counter,
PRIMARY KEY ((object_id, user_id), counter_id)
);

DROP TABLE woc.table_test;

CREATE TABLE woc.table_test (
object_id ascii,
user_id timeuuid,
counter_id ascii,
count int,
PRIMARY KEY ((object_id, user_id), counter_id)
);

Reply via email to