You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@cassandra.apache.org by Shreyas Chandra Sekhar <ss...@cloudian.com> on 2017/04/03 20:50:38 UTC

cql3 - adding two numbers in insert statement

Hi,

I am trying to generate a random value of certain length and use that as one
of the value in CQL3. Below is an example

 

INSERT INTO "KS"."CF" (key, column1, value) VALUES
(613462303431313435313838306530667c6263317431756331, 2633174317563312f6f36,
blobAsUuid(timeuuidAsBlob(now())) + 1000);

 

This errors, can anyone help with right syntax?

 

Thanks,

Shreyas


Re: cql3 - adding two numbers in insert statement

Posted by Alain RODRIGUEZ <ar...@gmail.com>.
Thanks for the feedback Shreyas,

it's good to keep a trace of solutions and workarounds in the archives of
the mailing list :-).

C*heers,
-----------------------
Alain Rodriguez - @arodream - alain@thelastpickle.com
France

The Last Pickle - Apache Cassandra Consulting
http://www.thelastpickle.com

2017-04-28 13:47 GMT+01:00 Shreyas Chandra Sekhar <ss...@cloudian.com>:

> Hi Alain,
>
> Thanks for the reply.
>
> I figured out the issue. We are using Cassandra 2.x. Cassandra-stress tool
> of 2.x could not handle upper case in its query.
>
> However this issue has been fixed in Cassandra 3.x stress tool. So used
> that binary of 3.x and had to use command line options to convert from v4
> to v3 to target Cassandra 2.x.
>
>
>
> Shreyas
>
>
>
> *From:* Alain RODRIGUEZ [mailto:arodrime@gmail.com]
> *Sent:* Friday, April 28, 2017 3:12 AM
> *To:* user@cassandra.apache.org
> *Subject:* Re: cql3 - adding two numbers in insert statement
>
>
>
> Hi Shreyas,
>
>
>
> It's good to paste the error if you want us to give you a quick and good
> answer. In this case the table schema would have been helpful as well.
>
>
>
> That being said, you are probably missing some quotes around the values
> for 'key' and 'column1'.
>
>
>
> C*heers,
>
> -----------------------
>
> Alain Rodriguez - @arodream - alain@thelastpickle.com
>
> France
>
>
>
> The Last Pickle - Apache Cassandra Consulting
>
> http://www.thelastpickle.com
>
>
>
> 2017-04-03 22:50 GMT+02:00 Shreyas Chandra Sekhar <ss...@cloudian.com>:
>
> Hi,
>
> I am trying to generate a random value of certain length and use that as
> one of the value in CQL3. Below is an example
>
>
>
> INSERT INTO "KS"."CF" (key, column1, value) VALUES (
> 613462303431313435313838306530667c6263317431756331,
> 2633174317563312f6f36, blobAsUuid(timeuuidAsBlob(now())) + 1000);
>
>
>
> This errors, can anyone help with right syntax?
>
>
>
> Thanks,
>
> Shreyas
>
>
>

RE: cql3 - adding two numbers in insert statement

Posted by Shreyas Chandra Sekhar <ss...@cloudian.com>.
Hi Alain,

Thanks for the reply. 

I figured out the issue. We are using Cassandra 2.x. Cassandra-stress tool of 2.x could not handle upper case in its query. 

However this issue has been fixed in Cassandra 3.x stress tool. So used that binary of 3.x and had to use command line options to convert from v4 to v3 to target Cassandra 2.x.

 

Shreyas

 

From: Alain RODRIGUEZ [mailto:arodrime@gmail.com] 
Sent: Friday, April 28, 2017 3:12 AM
To: user@cassandra.apache.org
Subject: Re: cql3 - adding two numbers in insert statement

 

Hi Shreyas,

 

It's good to paste the error if you want us to give you a quick and good answer. In this case the table schema would have been helpful as well.

 

That being said, you are probably missing some quotes around the values for 'key' and 'column1'.

 

C*heers,

-----------------------

Alain Rodriguez - @arodream - alain@thelastpickle.com <ma...@thelastpickle.com> 

France

 

The Last Pickle - Apache Cassandra Consulting

http://www.thelastpickle.com

 

2017-04-03 22:50 GMT+02:00 Shreyas Chandra Sekhar <ssekhar@cloudian.com <ma...@cloudian.com> >:

Hi,

I am trying to generate a random value of certain length and use that as one of the value in CQL3. Below is an example

 

INSERT INTO "KS"."CF" (key, column1, value) VALUES (613462303431313435313838306530667c6263317431756331, 2633174317563312f6f36, blobAsUuid(timeuuidAsBlob(now())) + 1000);

 

This errors, can anyone help with right syntax?

 

Thanks,

Shreyas

 


Re: cql3 - adding two numbers in insert statement

Posted by Alain RODRIGUEZ <ar...@gmail.com>.
Hi Shreyas,

It's good to paste the error if you want us to give you a quick and good
answer. In this case the table schema would have been helpful as well.

That being said, you are probably missing some quotes around the values for
'key' and 'column1'.

C*heers,
-----------------------
Alain Rodriguez - @arodream - alain@thelastpickle.com
France

The Last Pickle - Apache Cassandra Consulting
http://www.thelastpickle.com

2017-04-03 22:50 GMT+02:00 Shreyas Chandra Sekhar <ss...@cloudian.com>:

> Hi,
>
> I am trying to generate a random value of certain length and use that as
> one of the value in CQL3. Below is an example
>
>
>
> INSERT INTO "KS"."CF" (key, column1, value) VALUES (
> 613462303431313435313838306530667c6263317431756331,
> 2633174317563312f6f36, blobAsUuid(timeuuidAsBlob(now())) + 1000);
>
>
>
> This errors, can anyone help with right syntax?
>
>
>
> Thanks,
>
> Shreyas
>