Discarding Data in a Dataset (CLI)
Use the following procedure to discard an entire archived dataset, or a portion of an archived dataset. Datasets are automatically pruned according to the existing retention policy, but they can also be pruned manually. This process might take several minutes to complete, depending on the size of the dataset and the amount of pruning required. Note that datasets can only be pruned when they are active.
Example 1-1 Pruning by Granularity
In the following example, only the granularity is specified. This example discards all per-second and per-minute data collected before 4:56 PM on April 2, 2020.
hostname:analytics datasets> select dataset-001 hostname:analytics dataset-001> prune minute This will remove per-second and minute data collected prior to 2020-4-02 16:56:52. Are you sure? (Y/N) Y
Example 1-2 Pruning by Date
In the following example, only a date is specified. This example discards all per-second data collected before midnight on December 1, 2020.
hostname:analytics dataset-001> prune 2020-12-01 second This will remove per-second data collected prior to 2020-12-1 00:00. Are you sure? (Y/N) Y
Example 1-3 Pruning by Date and Time
In the following example, both a date and time are specified. This example discards per-second data collected at and before 12 PM on June 3, 2020.
hostname:analytics dataset-001> prune 2020-06-03 12:00:01 second This will remove per-second data collected prior to 2020-6-3 12:00:01. Are you sure? (Y/N) Y
Example 1-4 Pruning Detailed Datasets
The following prune
commands keep a day's worth of per-second data,
a couple weeks of per-minute data, and six months of per-hour data older than December 15,
2020.
hostname:analytics dataset-001> prune 2020-12-14 second hostname:analytics dataset-001> prune 2020-12-01 minute hostname:analytics dataset-001> prune 2020-6-01 hour