READ_ICEBERG, it accesses the table through either a location object or individual TVF parameters, and supports file-based catalogs as well as REST catalogs. Unlike READ_ICEBERG, it does not read the table’s rows; it returns one row per file, including the table’s delete files, with the per-file statistics, partition values, and deleted-row positions recorded in the Iceberg metadata.
Use it to inspect file layout, partitioning, file sizes, per-column min/max bounds, and deletes without scanning the underlying data, for example when debugging pruning, planning a vacuum, or auditing snapshot contents.
Syntax
LIST_ICEBERG_FILES accepts the same LOCATION / URL access and authentication parameters as READ_ICEBERG, plus the file-selection parameters below. It does not accept MAX_STALENESS.
Parameters
File selection parameters
Return Type
The result is a table with one row per file. Both data files and the table’s row-level delete files are listed as rows. The schema has three parts:- Fixed columns describing each file and its manifest entry.
- Per-column statistics: a
min_<column>andmax_<column>pair for every column of the table, holding the lower and upper bound recorded for that column in the file’s manifest entry. Each bound has the same data type as its source column and is nullable. - Per-partition values: a
partition_value_<partition_column>_<field_id>column for every partition field in the table’s partition specs, holding that file’s typed partition value.
Examples
The following code example summarizes an Iceberg table’s storage by file content type and format, including data and delete files. It reports file and manifest counts, record and byte totals, average file size, and the number of distinct partition values:Limitations
- The same catalog, file-format, and data-type support as
READ_ICEBERGapplies. deleted_positionsis a serialized Roaring bitmap. Decode it in application code rather than interpreting the raw bytes in SQL; uselength(deleted_positions) > 0to test whether a file has any deletes.