This action (deleteData) deletes the data older than a specified number of days from the given table name. It deletes data from:

 

 

NOTE: This action does not drop any partitions that are not archived. If you want to delete unarchived partitions, the optional flag forceDelete has to be specified with a value of true.

If forceDelete is used:

false or not specified

drops only the partitions older than keepDays and those that are archived

true

drops all the partitions older than keepDays including unarchived partitions

This command uses the following flags:

-action

deleteData

-keepDays

<number of days to keep>

[-forceDelete]

<either true or false>

-connectFile

<filePath>

-tableName

<table name>

To run deleteData:

Execute this command as follows:

-action deleteData -keepDays <numberofDaysToKeep> [-forceDelete <true/false>] -connectFile <filePath> -tableName <table name>

The following example drops partitions from all tables older than 13 days making sure all dropped partitions are archived. In the end, a list is generated of any partitions that were not deleted if they have not been archived.

./sdm -action deleteData keepDays 13 -forceDelete false -connectFile sdm.connect –tableName EVENTS

The following example drops the partitions from all tables older than 13 days making sure all dropped partitions are archived. In the end, it lists any partitions that were not deleted if they have not been archived.

sdm -action deleteData keepDays 13 -forceDelete false -connectFile sdm.connect –tableName EVENTS