@Laing thx for the info.

@Carlos I also check that page and I did not find it. I was asking to know
if someone has done smth to avoid change the column name everytime
cassandra adds new words to the list.




Saludos

Jean Carlo

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

On Wed, Mar 30, 2016 at 4:02 PM, Carlos Alonso <i...@mrcalonso.com> wrote:

> Well...
>
> I guess that if full is a reserved word there's nothing you can do to
> change that but then, checking which are the keywords for that version it
> turns out that full is not there!!
> https://docs.datastax.com/en/cql/3.1/cql/cql_reference/keywords_r.html
>
> Maybe a bug?
>
> Regards
>
> Carlos Alonso | Software Engineer | @calonso <https://twitter.com/calonso>
>
> On 30 March 2016 at 15:41, Jean Carlo <jean.jeancar...@gmail.com> wrote:
>
>> Yes we did some reads and writes, the problem is that adding double
>> quotes force us to modify our code to change and insert like that
>>
>> INSERT INTO table1 (bill_id, *full*, name,provider_date ,total) values
>> ('qs','full','name','2015-02-23','toltal');
>>
>> to this
>>
>> INSERT INTO table1 (bill_id, *"full"*, name,provider_date ,total) values
>> ('qs','full','name','2015-02-23','toltal');
>>
>> this last one is ok, but obviously the first one makes an error:
>>
>> cqlsh:pns_fr_2_jean> INSERT INTO table1 (bill_id, full,
>> name,provider_date ,total) values
>> ('qs','full','name','2015-02-23','toltal');
>> SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query]
>> message="line 1:29 no viable alternative at input '*full*' (INSERT INTO
>> table1 (bill_id, [full]...)">
>>
>> and it is because the name of the column is not longer full, is "full"
>>
>>
>>
>> Best regards
>>
>> Jean Carlo
>>
>> "The best way to predict the future is to invent it" Alan Kay
>>
>> On Wed, Mar 30, 2016 at 3:26 PM, Eric Evans <eev...@wikimedia.org> wrote:
>>
>>> On Wed, Mar 30, 2016 at 8:08 AM, Jean Carlo <jean.jeancar...@gmail.com>
>>> wrote:
>>> > 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
>>>
>>> I don't think it does though; You're meant to be able to use the
>>> output of DESC TABLE to (re)create these tables, so it's quoted below
>>> for the same reason you did so above.
>>>
>>> Obviously it would be better to have column names that parse without
>>> needing to be double quoted, but it should work.  Have you tried some
>>> reads and writes?
>>>
>>> > 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
>>> > )
>>>
>>>
>>> --
>>> Eric Evans
>>> eev...@wikimedia.org
>>>
>>
>>
>

Reply via email to