Description
Supported engine: SparkSQL
Applicable table: Native Iceberg tables.
Purpose: Query Iceberg table metadata in four-part format, including history, snapshots, files, and manifests.
Statement
SELECT select_expr (, select_expr)*
FROM `Catalog`.`db`.`tableName${history|snapshots|files|manifests|partitions|all_data_files|all_manifests}`
[WHERE where_condition]
[LIMIT [offset,] rows]
Example
SELECT * FROM `DataLakeCatalog`.`validation`.`dempts$history` ORDER BY snapshot_id DESC LIMIT 1;
SELECT * FROM `DataLakeCatalog`.`validation`.`dempts$snapshots` ORDER BY snapshot_id LIMIT 1;
SELECT * FROM `DataLakeCatalog`.`validation`.`dempts$files` ORDER BY file_size_in_bytes LIMIT 1;
SELECT * FROM `DataLakeCatalog`.`validation`.`dempts$manifests` ORDER BY length LIMIT 1;
SELECT * FROM `DataLakeCatalog`.`validation`.`dempts$partitions` LIMIT 10;
SELECT * FROM `DataLakeCatalog`.`validation`.`dempts$all_data_files` LIMIT 10;
SELECT * FROM `DataLakeCatalog`.`validation`.`dempts$all_manifests` LIMIT 10;
Was this page helpful?