This page was last edited on November 29, 2019, at 14:41.
Comments or questions about this documentation? Contact us for support!
If a file is used (-f option) to specify the tables to purge, the format of the file specified in the above point 4-b is as follows:
Each line in the text file contains five fields that are TAB separated.
The fields are:
tablename<TAB>columnname<TAB>additional key names<TAB>pk value<TAB>prk value
The following are the definitions of these fields.
Consider the following table definition:
CREATE TABLE act.alerts_triggered_by_call call_id uuid, alert_id uuid, alert_condition text, alert_timestamp timestamp, alert_type text, parameters map<text, text>, PRIMARY KEY (call_id, alert_id) ) WITH CLUSTERING ORDER BY (alert_id ASC)
The entry in the file for this would be:
act.alerts_triggered_by_call alert_timestamp call_id, alert_id no no
Since alert_timestamp is not part of the partition key, it is not a part of the primary key.
A sample of the command for this table would be:
java -jar DataPurgeUtility.jar -h 135.17.180.184 -p 9042 -d 30 -t act.alerts_triggered_by_call -c alert_timestamp -a "call_id,alert_id" -pk 0 -prk 0
Consider the following table:
CREATE TABLE beholder.changes ( timemodified timestamp, dbid int, changekey text, changeby text, changetopobjectname text, changevalue text, objecthostip text, objecthostname text, operationtype text, PRIMARY KEY (timemodified, dbid, changekey) ) WITH CLUSTERING ORDER BY (dbid ASC, changekey ASC)
The entry in the file for this would be:
beholder.changes timemodified dbid,changekey yes yes
Since timemodified is a part of the partition key and it is a part of the primary key.
A sample of the command for this table would be:
java -jar DataPurgeUtility.jar -h 135.17.180.184 -p 9042 -d 30 -t beholder.changes -c timemodified -a "dbid,changekey" -pk 1 -prk 1