Skip to main content

SHOW DELETE

Description

This statement is used to display the historical delete tasks that have been successfully executed

Syntax

SHOW DELETE [FROM <db_name>]

Optional Parameters

<db_name> : The name of the database to be displayed

Return Value

ColumnDescription
TableNameThe name of the table where the delete operation was executed.
PartitionNameThe name of the partition affected by the delete operation.
CreateTimeThe timestamp when the delete operation was issued.
DeleteConditionThe condition used for the delete operation, specifying which rows were deleted.
StateThe status of the delete operation

Example

  1. Go to the test database to view all historical delete tasks

    show delete;
    +---------------+---------------+---------------------+-----------------+----------+
    | TableName | PartitionName | CreateTime | DeleteCondition | State |
    +---------------+---------------+---------------------+-----------------+----------+
    | iceberg_table | * | 2025-03-14 15:53:32 | id EQ "1" | FINISHED |
    +---------------+---------------+---------------------+-----------------+----------+
  2. Display all historical delete tasks of database database

    show delete from tpch;
    +-----------+---------------+---------------------+-------------------+----------+
    | TableName | PartitionName | CreateTime | DeleteCondition | State |
    +-----------+---------------+---------------------+-------------------+----------+
    | customer | * | 2025-03-14 15:45:19 | c_custkey EQ "18" | FINISHED |
    +-----------+---------------+---------------------+-------------------+----------+