Re: Cannot set TTL in COPY command

2016-10-26 Thread Stefania Alborghetti
The TTL option for the COPY command was only added in 3.2, CASSANDRA-9494
<https://issues.apache.org/jira/browse/CASSANDRA-9494>.

On Thu, Oct 27, 2016 at 3:28 AM, Harikrishnan Pillai <
hpil...@walmartlabs.com> wrote:

> i have created a Jira for Cassandra version 3.9.Anyone have seen this
> scenario before in any 3.X version.
>
> https://issues.apache.org/jira/browse/CASSANDRA-12844
>
> Regards
>
> Hari
> --
> *From:* Lahiru Gamathige <lah...@highfive.com>
> *Sent:* Wednesday, October 26, 2016 10:46:51 AM
> *To:* user@cassandra.apache.org
> *Subject:* Re: Cannot set TTL in COPY command
>
> Highly recommend to move to a newer Cassandra version first because TTL
> and compaction are much more consistent.
> On Wed, Oct 26, 2016 at 10:36 AM, Tyler Hobbs <ty...@datastax.com> wrote:
>
>>
>> On Wed, Oct 26, 2016 at 10:07 AM, techpyaasa . <techpya...@gmail.com>
>> wrote:
>>
>>> Can some one please tell me how to set TTL using COPY command?
>>
>>
>> It looks like you're using Cassandra 2.0.  I don't think COPY supports
>> the TTL option until at least 2.1.
>>
>>
>> --
>> Tyler Hobbs
>> DataStax <http://datastax.com/>
>>
>
>


-- 


Stefania Alborghetti

|+852 6114 9265| stefania.alborghe...@datastax.com


Re: Cannot set TTL in COPY command

2016-10-26 Thread Harikrishnan Pillai
i have created a Jira for Cassandra version 3.9.Anyone have seen this scenario 
before in any 3.X version.

https://issues.apache.org/jira/browse/CASSANDRA-12844

Regards

Hari


From: Lahiru Gamathige <lah...@highfive.com>
Sent: Wednesday, October 26, 2016 10:46:51 AM
To: user@cassandra.apache.org
Subject: Re: Cannot set TTL in COPY command

Highly recommend to move to a newer Cassandra version first because TTL and 
compaction are much more consistent.
On Wed, Oct 26, 2016 at 10:36 AM, Tyler Hobbs 
<ty...@datastax.com<mailto:ty...@datastax.com>> wrote:

On Wed, Oct 26, 2016 at 10:07 AM, techpyaasa . 
<techpya...@gmail.com<mailto:techpya...@gmail.com>> wrote:
Can some one please tell me how to set TTL using COPY command?

It looks like you're using Cassandra 2.0.  I don't think COPY supports the TTL 
option until at least 2.1.


--
Tyler Hobbs
DataStax<http://datastax.com/>



Re: Cannot set TTL in COPY command

2016-10-26 Thread Lahiru Gamathige
Highly recommend to move to a newer Cassandra version first because TTL and
compaction are much more consistent.
On Wed, Oct 26, 2016 at 10:36 AM, Tyler Hobbs  wrote:

>
> On Wed, Oct 26, 2016 at 10:07 AM, techpyaasa . 
> wrote:
>
>> Can some one please tell me how to set TTL using COPY command?
>
>
> It looks like you're using Cassandra 2.0.  I don't think COPY supports the
> TTL option until at least 2.1.
>
>
> --
> Tyler Hobbs
> DataStax 
>


Re: Cannot set TTL in COPY command

2016-10-26 Thread Tyler Hobbs
On Wed, Oct 26, 2016 at 10:07 AM, techpyaasa .  wrote:

> Can some one please tell me how to set TTL using COPY command?


It looks like you're using Cassandra 2.0.  I don't think COPY supports the
TTL option until at least 2.1.


-- 
Tyler Hobbs
DataStax 


Re: Cannot set TTL in COPY command

2016-10-26 Thread Lahiru Gamathige
Yes if you alter the table now all the new data would have ttl attached but
not the old data.

On Wed, Oct 26, 2016 at 8:39 AM, techpyaasa .  wrote:

> And to add to above email , its already existing table with some data and
> NOT new table.
> Is it ok to change table property default_time_to_live now?
>
> On Wed, Oct 26, 2016 at 9:06 PM, laxmikanth sadula <
> laxmikanth...@gmail.com> wrote:
>
>> You mean to say instead of
>> *COPY keyspace1.columnFamily1 FROM 'dump_data.csv' WITH TTL = '7200';*use
>>
>>
>> *COPY keyspace1.columnFamily1 FROM 'dump_data.csv'
>> WITH DEFAULT_TIME_TO_LIVE = '7200';*
>> I tried this way too, but again exception thrown saying "*Unrecognized
>> COPY FROM options: default_time_to_live*" :( :(
>>
>> On Wed, Oct 26, 2016 at 8:53 PM, Lahiru Gamathige 
>> wrote:
>>
>>> You have to use with default_time_to_live = 7200.
>>>
>>> On Wed, Oct 26, 2016 at 8:07 AM, techpyaasa . 
>>> wrote:
>>>
 Hi all,

 I'm getting following exception when I try to set TTL using COPY
 command, where as it is working fine without TTL option. Followed doc at
 https://docs.datastax.com/en/cql/3.1/cql/cql_reference/copy_r.html

 *"**Improper COPY command.**"*

 Command used as below

 *COPY keyspace1.columnFamily1 FROM 'dump_data.csv' WITH TTL = '7200';*


 Version is as below

 *[cqlsh 4.1.1 | Cassandra 2.0.17 | CQL spec 3.1.1 | Thrift protocol
 19.39.0]*


 Can some one please tell me how to set TTL using COPY command?

 Thanks
 Techpyaasa

>>>
>>>
>>
>>
>> --
>> Regards,
>> Laxmikanth
>> 99621 38051
>>
>>
>


Re: Cannot set TTL in COPY command

2016-10-26 Thread techpyaasa .
And to add to above email , its already existing table with some data and
NOT new table.
Is it ok to change table property default_time_to_live now?

On Wed, Oct 26, 2016 at 9:06 PM, laxmikanth sadula 
wrote:

> You mean to say instead of
> *COPY keyspace1.columnFamily1 FROM 'dump_data.csv' WITH TTL = '7200';*use
>
>
> *COPY keyspace1.columnFamily1 FROM 'dump_data.csv'
> WITH DEFAULT_TIME_TO_LIVE = '7200';*
> I tried this way too, but again exception thrown saying "*Unrecognized
> COPY FROM options: default_time_to_live*" :( :(
>
> On Wed, Oct 26, 2016 at 8:53 PM, Lahiru Gamathige 
> wrote:
>
>> You have to use with default_time_to_live = 7200.
>>
>> On Wed, Oct 26, 2016 at 8:07 AM, techpyaasa . 
>> wrote:
>>
>>> Hi all,
>>>
>>> I'm getting following exception when I try to set TTL using COPY
>>> command, where as it is working fine without TTL option. Followed doc at
>>> https://docs.datastax.com/en/cql/3.1/cql/cql_reference/copy_r.html
>>>
>>> *"**Improper COPY command.**"*
>>>
>>> Command used as below
>>>
>>> *COPY keyspace1.columnFamily1 FROM 'dump_data.csv' WITH TTL = '7200';*
>>>
>>>
>>> Version is as below
>>>
>>> *[cqlsh 4.1.1 | Cassandra 2.0.17 | CQL spec 3.1.1 | Thrift protocol
>>> 19.39.0]*
>>>
>>>
>>> Can some one please tell me how to set TTL using COPY command?
>>>
>>> Thanks
>>> Techpyaasa
>>>
>>
>>
>
>
> --
> Regards,
> Laxmikanth
> 99621 38051
>
>


Re: Cannot set TTL in COPY command

2016-10-26 Thread laxmikanth sadula
You mean to say instead of
*COPY keyspace1.columnFamily1 FROM 'dump_data.csv' WITH TTL = '7200';*use


*COPY keyspace1.columnFamily1 FROM 'dump_data.csv'
WITH DEFAULT_TIME_TO_LIVE = '7200';*
I tried this way too, but again exception thrown saying "*Unrecognized COPY
FROM options: default_time_to_live*" :( :(

On Wed, Oct 26, 2016 at 8:53 PM, Lahiru Gamathige 
wrote:

> You have to use with default_time_to_live = 7200.
>
> On Wed, Oct 26, 2016 at 8:07 AM, techpyaasa . 
> wrote:
>
>> Hi all,
>>
>> I'm getting following exception when I try to set TTL using COPY command,
>> where as it is working fine without TTL option. Followed doc at
>> https://docs.datastax.com/en/cql/3.1/cql/cql_reference/copy_r.html
>>
>> *"**Improper COPY command.**"*
>>
>> Command used as below
>>
>> *COPY keyspace1.columnFamily1 FROM 'dump_data.csv' WITH TTL = '7200';*
>>
>>
>> Version is as below
>>
>> *[cqlsh 4.1.1 | Cassandra 2.0.17 | CQL spec 3.1.1 | Thrift protocol
>> 19.39.0]*
>>
>>
>> Can some one please tell me how to set TTL using COPY command?
>>
>> Thanks
>> Techpyaasa
>>
>
>


-- 
Regards,
Laxmikanth
99621 38051


Re: Cannot set TTL in COPY command

2016-10-26 Thread Lahiru Gamathige
You have to use with default_time_to_live = 7200.

On Wed, Oct 26, 2016 at 8:07 AM, techpyaasa .  wrote:

> Hi all,
>
> I'm getting following exception when I try to set TTL using COPY command,
> where as it is working fine without TTL option. Followed doc at
> https://docs.datastax.com/en/cql/3.1/cql/cql_reference/copy_r.html
>
> *"**Improper COPY command.**"*
>
> Command used as below
>
> *COPY keyspace1.columnFamily1 FROM 'dump_data.csv' WITH TTL = '7200';*
>
>
> Version is as below
>
> *[cqlsh 4.1.1 | Cassandra 2.0.17 | CQL spec 3.1.1 | Thrift protocol
> 19.39.0]*
>
>
> Can some one please tell me how to set TTL using COPY command?
>
> Thanks
> Techpyaasa
>


Cannot set TTL in COPY command

2016-10-26 Thread techpyaasa .
Hi all,

I'm getting following exception when I try to set TTL using COPY command,
where as it is working fine without TTL option. Followed doc at
https://docs.datastax.com/en/cql/3.1/cql/cql_reference/copy_r.html

*"**Improper COPY command.**"*

Command used as below

*COPY keyspace1.columnFamily1 FROM 'dump_data.csv' WITH TTL = '7200';*


Version is as below

*[cqlsh 4.1.1 | Cassandra 2.0.17 | CQL spec 3.1.1 | Thrift protocol
19.39.0]*


Can some one please tell me how to set TTL using COPY command?

Thanks
Techpyaasa