Iceberg Metadata Tables
This topic describes how to inspect the metadata information of Iceberg tables in StarRocks.
Overviewβ
From V3.4.1 onwards, StarRocks supports Iceberg metadata tables. These metadata tables contain a variety of information about Iceberg tables, such as table change history, snapshots, and manifests. You can query each metadata table by appending the metadata table name to the original table name.
Currently, StarRocks supports the following Iceberg metadata tables:
| Metadata table | Description |
|---|---|
history | Shows a log of metadata changes made to the table. |
metadata_log_entries | Shows the metadata log entries for the table. |
snapshots | Shows details about the table snapshots. |
manifests | Shows an overview of the manifests associated with the snapshots in the tableβs log. |
partitions | Shows details about the partitions in the table. |
files | Shows details about the data files and delete files in the current snapshot of the table. |
refs | Shows details about the Iceberg references, including branches and tags. |
history tableβ
Usage:
SELECT * FROM [<catalog>.][<database>.]table$history;
Output:
| Field | Description |
|---|---|
| made_current_at | The time when the snapshot became the current snapshot. |
| snapshot_id | The ID of the snapshot. |
| parent_id | The ID of the parent snapshot. |
| is_current_ancestor | Whether this snapshot is an ancestor of the current snapshot. |
metadata_log_entries tableβ
Usage:
SELECT * FROM [<catalog>.][<database>.]table$metadata_log_entries;
Output:
| Field | Description |
|---|---|
| timestamp | The time when the metadata was recorded. |
| file | The location of the metadata file. |
| latest_snapshot_id | The ID of the latest snapshot when the metadata was updated. |
| latest_schema_id | The ID of the latest schema when the metadata was updated. |
| latest_sequence_number | The data sequence number of the metadata file. |