You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Rahul Bhardwaj <ra...@indiamart.com> on 2015/01/29 06:28:13 UTC

error while bulk loading using copy command

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 <http://www.indiamart.com> for latest updates on this 
and more: <https://plus.google.com/+indiamart> 
<https://www.facebook.com/IndiaMART> <https://twitter.com/IndiaMART> Mobile 
Channel: 
<https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=668561641&mt=8> 
<https://play.google.com/store/apps/details?id=com.indiamart.m> 
<http://m.indiamart.com/>
<https://www.youtube.com/watch?v=DzORNbeSXN8&list=PL2o4J51MqpL0mbue6kzDa6eymLVUXtlR1&index=2>
Watch how Irrfan Khan gets his work done in no time on IndiaMART, kyunki Kaam 
Yahin Banta Hai <https://www.youtube.com/watch?v=hmS4Afl2bNU>!!!

Re: error while bulk loading using copy command

Posted by Rahul Bhardwaj <ra...@indiamart.com>.
Thanks Eric..

yes 18 lacs implies 1.8 million.

On Thu, Jan 29, 2015 at 9:01 PM, Eric Stevens <mi...@gmail.com> 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
> <http://en.wikipedia.org/wiki/Lakh> 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 <
> rahul.bhardwaj@indiamart.com> 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 <http://www.indiamart.com> for latest updates on
>> this and more: <https://plus.google.com/+indiamart>
>> <https://www.facebook.com/IndiaMART> <https://twitter.com/IndiaMART>
>> Mobile Channel:
>> <https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=668561641&mt=8>
>> <https://play.google.com/store/apps/details?id=com.indiamart.m>
>> <http://m.indiamart.com/>
>>
>> <https://www.youtube.com/watch?v=DzORNbeSXN8&list=PL2o4J51MqpL0mbue6kzDa6eymLVUXtlR1&index=2>
>> Watch how Irrfan Khan gets his work done in no time on IndiaMART, kyunki Kaam
>> Yahin Banta Hai <https://www.youtube.com/watch?v=hmS4Afl2bNU>!!!
>
>
>

-- 

Follow IndiaMART.com <http://www.indiamart.com> for latest updates on this 
and more: <https://plus.google.com/+indiamart> 
<https://www.facebook.com/IndiaMART> <https://twitter.com/IndiaMART> Mobile 
Channel: 
<https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=668561641&mt=8> 
<https://play.google.com/store/apps/details?id=com.indiamart.m> 
<http://m.indiamart.com/>
<https://www.youtube.com/watch?v=DzORNbeSXN8&list=PL2o4J51MqpL0mbue6kzDa6eymLVUXtlR1&index=2>
Watch how Irrfan Khan gets his work done in no time on IndiaMART, kyunki Kaam 
Yahin Banta Hai <https://www.youtube.com/watch?v=hmS4Afl2bNU>!!!

Re: error while bulk loading using copy command

Posted by Eric Stevens <mi...@gmail.com>.
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
<http://en.wikipedia.org/wiki/Lakh> 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 <
rahul.bhardwaj@indiamart.com> 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 <http://www.indiamart.com> for latest updates on
> this and more: <https://plus.google.com/+indiamart>
> <https://www.facebook.com/IndiaMART> <https://twitter.com/IndiaMART>
> Mobile Channel:
> <https://itunes.apple.com/WebObjects/MZStore.woa/wa/viewSoftware?id=668561641&mt=8>
> <https://play.google.com/store/apps/details?id=com.indiamart.m>
> <http://m.indiamart.com/>
>
> <https://www.youtube.com/watch?v=DzORNbeSXN8&list=PL2o4J51MqpL0mbue6kzDa6eymLVUXtlR1&index=2>
> Watch how Irrfan Khan gets his work done in no time on IndiaMART, kyunki Kaam
> Yahin Banta Hai <https://www.youtube.com/watch?v=hmS4Afl2bNU>!!!