Skip to main content
Recovers a database, table, or partition that was dropped by using the DROP command. The dropped database, table, or partition can be recovered within the period specified by the FE parameter catalog_trash_expire_second (1 day by default). Data deleted by using TRUNCATE TABLE cannot be recovered.

Syntax

  1. Recover a database.
  2. Recover a table.
  3. Recover a partition.
Note:
  1. This command can only recover metadata deleted some time ago (1 day by default). You can change the duration by adjusting the FE parameter catalog_trash_expire_second.
  2. If the metadata is deleted with identical metadata created, the previous one will not be recovered.

Examples

  1. Recover database example_db.
  2. Recover table example_tbl.
  3. Recover partition p1 in the example_tbl table.