SHOW RESTORE STATUS
Overview
SHOW RESTORE STATUS shows the status of archive-file retrieval tasks submitted by RESTORE TABLE. Because retrieval is asynchronous, run this command after submitting RESTORE TABLE and confirm that files have changed from RESTORING to RESTORED before reading or importing them.
Syntax
Parameters
| Parameter | Description |
|---|---|
<namespace> | Optional schema name. If omitted, the current schema is used. |
<table_name> | Name of the table for which RESTORE TABLE was executed. |
SUBDIRECTORY '<path>' | Specifies the archive-file subdirectory to inspect. Use the same path that was specified in RESTORE TABLE. |
Examples
Example 1: Check files that are being retrieved
While retrieval is in progress, the result can be:
| file | state |
|---|---|
archive/20260829/part00001 | {"status":"RESTORING"} |
Example 2: Confirm that retrieval is complete
Run the same query again until the status becomes RESTORED:
| file | state |
|---|---|
archive/20260829/part00001 | {"status":"RESTORED"} |
Only files with the RESTORED status can be read as data. The current response contains file and state columns; state is a JSON string containing the status.
Notes
- This command reports retrieval tasks for archive files submitted by
RESTORE TABLE; it does not report Time Travel historical-version recovery. - Do not read a file while its status is
RESTORING. - When retrieval completes, the status is
RESTORED. If retrieval fails, check the returned status and job information before resubmitting. SUBDIRECTORYmust match the path used for the retrieval task. Use a separate subdirectory for each archived partition.IAfiles do not supportRESTORE TABLEand therefore do not apply to this command.
