Search code examples
csvcassandracounterbulkcql3

How can a CSV file with counter columns be loaded to a Cassandra CQL3 table


I have a CSV file in the following format

key1,key2,key3,counter1,counter2,counter3,counter4
1,2,1,0,0,0,1
1,2,2,0,1,0,4

The CQL3 table has all value columns of type 'counter'. When I try to use the COPY command to load the CSV I get the usual error which asks for an UPDATE instead of an INSERT.

The question is : how can I tell CQL to use an UPDATE ?

Is there any other way to do this ?


Solution

  • using sstables solved this issue. Although a little slower than what i expected , it does the job