Dropping Partitions

The dropPartition action drops all the partitions older than the flag keepDays from the following tables:

To prevent unintentional loss of data, this action does not drop any partitions that are not archived. If you want to delete unarchived partitions, use the forceDelete flag.

WARNING:If - forceDelete is used, the deleted data cannot be recovered, so use this option with caution.

This action uses the following flags:

Table 4 Dropping Partition Flags

Command

Command Flags

-action

dropPartitions

-keepDays

<number of days to keep>

-forceDelete (optional)

<either “true” or “false”>

This defaults to false if not specified, meaning that only the partitions that are older than keepDays and are already archived are dropped.

If this is set to true, all partitions older than keepDays are dropped, even if they have not been archived.

-connectFile

<filePath>

-tableName

<table name>

NOTE:Sentinel partitioned tables are organized into two groups. One is the EVENTS table group, which includes EVENTS and CORRELATED_EVENTS; the other is the summary table group, which includes all summary, or aggregate, tables. If any one of the tables in the group is specified by the –tableName parameter, the dropPartition operation is applied to all tables in that group.

To run dropPartition:

  1. Execute this command as follows:

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

    The following examples drops all the partitions older than 30 days, making sure all the partitions are archived. All partitions that were skipped (not removed) because they have not been archived are listed when the operation completes.

    • PostgreSQL Example:

      ./sdm –action dropPartitions –keepDays 30 –tableName CORRELATED_EVENTS –forceDelete false –connectFile sdm.connect
      

For trademark and copyright information, see Legal Notices.