We have a table that doesn't have TTL set till now. We are planning to alter the table and set TTL with 28 days. Could you please let me know how we can update and set the TTL for the existing data?
Bringing together the Apache Cassandra experts from the community and DataStax.
Want to learn? Have a question? Want to share your expertise? You are in the right place!
Not sure where to begin? Getting Started
There is no out-of-the-box solution to update the TTL of all the partitions in the table.
You will need to write a custom application to iterate over all the partitions and update them one-by-one. We recommend using Spark for this type of operation since this job will require a full table scan. Spark via the Spark-Cassandra-connector will efficiently execute this job. Cheers!
5 People are following this question.