0
votes

I'm a newbie to cassandra. I have a confusion with archival of data. Following is the approach I am trying to implement.

  • Filter the records to be archived.
  • Create a new column family
  • Move the filtered records to the new column family
  • Delete the filtered records from existing column family

Filter the records to be archived. - Achieved with the use of secondary indexes
Create a new column family Create Query
Move the filtered records to the new column family I thought of implementing this by the approach mentioned in cassandra copy data from one columnfamily to another columnfamily
But this copies all the data from column family 1 to 2. Is it possible to move only the filtered rows to new column family?
Delete the filtered records from existing column family I am not sure of how to achieve this in CQL. Please help me.

Additionally, Let me know if there is any better approach.

1

1 Answers

0
votes

COPY then DELETE sounds like a valid strategy here.

For deleting rows, take a look at the DELETE command, it takes the same WHERE condition as a SELECT does.

Unfortunately this won't work for a query that requires "ALLOW FILTERING", although there is an enhancement request to add this.