- Categories:
ICEBERG_TABLE_SNAPSHOT_REFRESH_HISTORY¶
Returns metadata and snapshot information about the most recent refresh history for a specified externally managed Apache Iceberg™ table.
Note
Snowflake version 9.16 added Delta-based table support for this function. The function only displays Delta-based table refresh data from version 9.16 and later.
- See also:
Apache Iceberg™ tables , Metadata and retention for Apache Iceberg™ tables , ALTER ICEBERG TABLE … REFRESH
Syntax¶
Arguments¶
TABLE_NAME => 'table_name'The name of the externally managed Iceberg table for which you want to retrieve the snapshot refresh history.
Output¶
The function returns the following columns:
Column name |
Data type |
Description |
Delta-based table note |
|---|---|---|---|
REFRESHED_ON |
TIMESTAMP_LTZ |
The timestamp when the table was last refreshed. |
|
METADATA_FILE_NAME |
TEXT |
The full path to the metadata file. |
The full path to the commit or checkpoint file. |
SNAPSHOT_ID |
TEXT |
The snapshot ID of the last refresh. |
The resulting commit ID of the last refresh. |
SEQUENCE_NUMBER |
TEXT |
The sequence number of the last refresh; NULL for Iceberg v1. |
Not applicable for Delta-based tables; displays as NULL. |
ICEBERG_SCHEMA_ID |
TEXT |
The schema ID of the refresh (from metadata). |
Not applicable for Delta-based tables; displays as NULL. |
QUERY_ID |
TEXT |
The ID of the query that performed the refresh. For tables that use automated refresh, this column contains a sentinel value, which indicates that the refresh was automated. |
|
IS_CURRENT_SNAPSHOT |
BOOLEAN |
TRUE if the table is refreshed on this snapshot; otherwise, FALSE. |
TRUE if the table is refreshed on this version (commit); otherwise, FALSE. |
SNAPSHOT_SUMMARY |
VARIANT |
The Iceberg snapshot summary from the |
Not applicable for Delta-based tables; displays as NULL. |
Examples¶
Retrieve information for the current version of an externally managed Iceberg table named my_iceberg_table:
Output: