Skip to main content

SHOW CATALOG RECYCLE BIN

Description

This statement is used to display the recoverable metadata of databases, tables, or partitions in the recycle bin.

Syntax

SHOW CATALOG RECYCLE BIN [ WHERE NAME [ = "<name>" | LIKE "<name_matcher>"] ]

Optional Parameters

Filter by name

1. <name>

The name of the database, table, or partition.

Filter by pattern matching

1. <name_matcher>

The pattern matching for the name of the database, table, or partition.

Return Values

ColumnTypeNote
TypeStringMetadata type: Database, Table, Partition
NameStringMetadata name
DbIdBigintID of the database
TableIdBigintID of the table
PartitionIdBigintID of the partition
DropTimeDateTimeTime when the metadata was moved to the recycle bin
DataSizeBigintData size. If the metadata type is database, this value includes the data size of all tables and partitions in the recycle bin
RemoteDataSizeDecimalData size on remote storage (HDFS or object storage). If the metadata type is database, this value includes the remote data size of all tables and partitions in the recycle bin

Access Control Requirements

PrivilegeObjectNotes
ADMIN_PRIV

Examples

  1. Display all metadata in the recycle bin

    SHOW CATALOG RECYCLE BIN;
  2. Display metadata with the name 'test' in the recycle bin

    SHOW CATALOG RECYCLE BIN WHERE NAME = 'test';
  3. Display metadata with names starting with 'test' in the recycle bin

    SHOW CATALOG RECYCLE BIN WHERE NAME LIKE 'test%';