error while bulk loading using copy command

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

error while bulk loading using copy command

Rahul Bhardwaj
Hi All,

We need to upload 18 lacs rows into a table which consist columns with data type "counter".

on uploading using copy command , we are getting below error:

Bad Request: INSERT statement are not allowed on counter tables, use UPDATE instead

we need counter data type because after loading this data we want to use functionality of counter data type.

Kindly help is there any way to do this.


Regards:
Rahul Bhardwaj 


Follow IndiaMART.com for latest updates on this and more: Mobile Channel:

Watch how Irrfan Khan gets his work done in no time on IndiaMART, kyunki Kaam Yahin Banta Hai!!!
Reply | Threaded
Open this post in threaded view
|

Re: error while bulk loading using copy command

Eric Stevens
As the error implies, you cannot insert into counters tables, you can only update them as increments or decrements (updating a counter that doesn't exist will create it with the initial delta as if it had started at zero).

I would recommend this documentation which describes how to update counters: http://www.datastax.com/documentation/cql/3.0/cql/cql_using/use_counter_t.html

Also, just for clarification (because I had to Google it), lac isn't a common unit where I'm from, by 18 lacs I assume you mean 1.8 million (1,800,000)?

On Wed, Jan 28, 2015 at 10:28 PM, Rahul Bhardwaj <[hidden email]> wrote:
Hi All,

We need to upload 18 lacs rows into a table which consist columns with data type "counter".

on uploading using copy command , we are getting below error:

Bad Request: INSERT statement are not allowed on counter tables, use UPDATE instead

we need counter data type because after loading this data we want to use functionality of counter data type.

Kindly help is there any way to do this.


Regards:
Rahul Bhardwaj 


Follow IndiaMART.com for latest updates on this and more: Mobile Channel:

Watch how Irrfan Khan gets his work done in no time on IndiaMART, kyunki Kaam Yahin Banta Hai!!!

Reply | Threaded
Open this post in threaded view
|

Re: error while bulk loading using copy command

Rahul Bhardwaj
Thanks Eric..

yes 18 lacs implies 1.8 million.

On Thu, Jan 29, 2015 at 9:01 PM, Eric Stevens <[hidden email]> wrote:
As the error implies, you cannot insert into counters tables, you can only update them as increments or decrements (updating a counter that doesn't exist will create it with the initial delta as if it had started at zero).

I would recommend this documentation which describes how to update counters: http://www.datastax.com/documentation/cql/3.0/cql/cql_using/use_counter_t.html

Also, just for clarification (because I had to Google it), lac isn't a common unit where I'm from, by 18 lacs I assume you mean 1.8 million (1,800,000)?

On Wed, Jan 28, 2015 at 10:28 PM, Rahul Bhardwaj <[hidden email]> wrote:
Hi All,

We need to upload 18 lacs rows into a table which consist columns with data type "counter".

on uploading using copy command , we are getting below error:

Bad Request: INSERT statement are not allowed on counter tables, use UPDATE instead

we need counter data type because after loading this data we want to use functionality of counter data type.

Kindly help is there any way to do this.


Regards:
Rahul Bhardwaj 


Follow IndiaMART.com for latest updates on this and more: Mobile Channel:

Watch how Irrfan Khan gets his work done in no time on IndiaMART, kyunki Kaam Yahin Banta Hai!!!




Follow IndiaMART.com for latest updates on this and more: Mobile Channel:

Watch how Irrfan Khan gets his work done in no time on IndiaMART, kyunki Kaam Yahin Banta Hai!!!