DROP_PARTITION

Drops the specified partition. If the WOS contains table data, DROP_PARTITION forces a moveout before it executes the drop operation.

Syntax

DROP_PARTITION (
    '[schema.]table‑name',
    partition‑value
    [, ignore‑moveout‑errors] 
    [, reorganize‑data ] 
)

Parameters

schema

Specifies a schema. If multiple schemas are defined in the database, include the schema name. For example:

myschema.thisDbObject
table‑name

The target table. The table cannot be used as a dimension table in a pre-join projection and cannot have out-of-date (unrefreshed) projections.

partition‑value

The key of the partition to drop.

ignore‑moveout‑errors

Optional Boolean argument:

  • true: Ignores any WOS moveout errors and forces the operation to continue. Set this parameter to true only if there is no WOS data for the partition.
  • false (default): Displays any moveout errors and aborts the operation on error.

Note: If you set this parameter to true and the WOS includes data for the partition in WOS, partition data in WOS is not dropped.

reorganize‑data

Optional Boolean argument:

  • true: Reorganizes the data if it is not organized, and then drops the partition.
  • false: Does not attempt to reorganize the data before dropping the partition. If this parameter is false and the function encounters a ROS without partition keys, an error occurs.

Privileges

One of the following:

Examples

See Dropping Partitions in the Administrator's Guide.