cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jean Carlo <jean.jeancar...@gmail.com>
Subject Re: Migration from 2.0.10 to 2.1.12
Date Wed, 30 Mar 2016 13:08:26 GMT
With double quotes it doesn't show error

CREATE TABLE table1 (     bill_id text,     "full" text,     name text,
provider_date timestamp,     total text,     PRIMARY KEY ( bill_id) ) ;

but it changes the name of the column

desc table table1;

CREATE TABLE pns_fr_2_jean.table1 (
    bill_id text PRIMARY KEY,
*    "full" text,*
    name text,
    provider_date timestamp,
    total text
)

instead of

CREATE TABLE pns_fr_2_jean.table1 (
    bill_id text PRIMARY KEY,
*    full text,*
    name text,
    provider_date timestamp,
    total text
)

and with singles quotes the result is an error

CREATE TABLE table1 (     bill_id text,   *  'full' text*,     name
text,     provider_date timestamp,     total text,     PRIMARY KEY (
bill_id) ) ;
SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query]
message="line 1:44 mismatched input 'full' expecting ')' (... table1 (
bill_id text,     ['ful]l' text...)">


So far using double quotes doesn't resolve my problem



Saludos

Jean Carlo

"The best way to predict the future is to invent it" Alan Kay

On Wed, Mar 30, 2016 at 12:53 PM, Carlos Alonso <info@mrcalonso.com> wrote:

> Try surrounding it with quotes.
>
> Didn't know about the reserved keyword full though.
>
> Regards
>
> Carlos Alonso | Software Engineer | @calonso <https://twitter.com/calonso>
>
> On 30 March 2016 at 10:36, Jean Carlo <jean.jeancarl48@gmail.com> wrote:
>
>> Hi!
>>
>> I am creating my new tables on cassandra 2.1.12 and I have this one
>>
>> CREATE TABLE table1 (
>>     bill_id text,
>>     full text,
>>     name text,
>>     provider_date timestamp,
>>     total text,
>>     PRIMARY KEY ( bill_id)
>> )
>>
>> And cassandra tells me this error
>>
>> SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query]
>> message="line 1:44 mismatched input 'full' expecting ')' (... table1 (
>> bill_id text,     [full] text...)">
>>
>> Is the word "full" reserved by cassandra?
>>
>> In order to not change all the configuration in production, there is a
>> way to conserve the name of my column as it was with the version 2.0.10?
>>
>>
>> Saludos
>>
>> Jean Carlo
>>
>> "The best way to predict the future is to invent it" Alan Kay
>>
>
>

Mime
View raw message