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 . <techpya...@gmail.com> 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 <lah...@highfive.com> >> wrote: >> >>> You have to use with default_time_to_live = 7200. >>> >>> On Wed, Oct 26, 2016 at 8:07 AM, techpyaasa . <techpya...@gmail.com> >>> 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 >> >> >