cassandracqlpycassa

Find upserted keys in Cassandra columnfamily within time interval


Is it possible to get the list of affected keys in a cassandra column family within a time interval.Cassandra does maintain column level timestamps. Can it be leveraged somehow ?

I have a simple columnfamily (key, value) and I want to know which keys were updated/inserted in the last one day. Unfortunately, I can't modify the column family to include a timestamp column and index it, as is generally advised. Does anyone have any other thoughts/hacks on how can this problem be tackled ?


Solution

  • If you can't modify the table you have to scan the whole table across the cluster. In CQL 3 and later you can write

    SELECT key, value, WRITETIME(value) FROM kvtable;
    

    This is the only way and it's very onerous to the cluster

    HTH, Carlo