|
| 1 | +--- |
| 2 | +title: ICEBERG_MANIFEST |
| 3 | +--- |
| 4 | +import FunctionDescription from '@site/src/components/FunctionDescription'; |
| 5 | + |
| 6 | +<FunctionDescription description="Introduced or updated: v1.2.709"/> |
| 7 | + |
| 8 | +Returns metadata about manifest files of an Iceberg table, including file paths, partitioning details, and snapshot associations. |
| 9 | + |
| 10 | +## Syntax |
| 11 | + |
| 12 | +```sql |
| 13 | +ICEBERG_MANIFEST('<database_name>', '<table_name>'); |
| 14 | +``` |
| 15 | + |
| 16 | +## Output |
| 17 | + |
| 18 | +The function returns a table with the following columns: |
| 19 | + |
| 20 | +- `content` (`INT`): The content type (0 for data files, 1 for delete files). |
| 21 | +- `path` (`STRING`): The file path of the data or delete file. |
| 22 | +- `length` (`BIGINT`): The file size in bytes. |
| 23 | +- `partition_spec_id` (`INT`): The partition specification ID associated with the file. |
| 24 | +- `added_snapshot_id` (`BIGINT`): The snapshot ID that added this file. |
| 25 | +- `added_data_files_count` (`INT`): The number of new data files added. |
| 26 | +- `existing_data_files_count` (`INT`): The number of existing data files referenced. |
| 27 | +- `deleted_data_files_count` (`INT`): The number of data files deleted. |
| 28 | +- `added_delete_files_count` (`INT`): The number of delete files added. |
| 29 | +- `partition_summaries` (`MAP<STRING, STRING>`): Summary of partition values related to the file. |
| 30 | + |
| 31 | +## Examples |
| 32 | + |
| 33 | +```sql |
| 34 | +SELECT * FROM ICEBERG_MANIFEST('tpcds', 'catalog_returns'); |
| 35 | + |
| 36 | +╭───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╮ |
| 37 | +│ content │ path │ length │ partition_spec │ added_snapshot │ added_data_fil │ existing_data_ │ deleted_data_ │ added_delete_ │ existing_dele │ deleted_delet │ partition_sum │ |
| 38 | +│ Int32 │ String │ Int64 │ _id │ _id │ es_count │ files_count │ files_count │ files_count │ te_files_coun │ e_files_count │ maries │ |
| 39 | +│ │ │ │ Int32 │ Nullable(Int64 │ Nullable(Int32 │ Nullable(Int32 │ Nullable(Int3 │ Nullable(Int3 │ t │ Nullable(Int3 │ Array(Nullabl │ |
| 40 | +│ │ │ │ │ ) │ ) │ ) │ 2) │ 2) │ Nullable(Int3 │ 2) │ e(Tuple(Nulla │ |
| 41 | +│ │ │ │ │ │ │ │ │ │ 2) │ │ ble(Boolean), │ |
| 42 | +│ │ │ │ │ │ │ │ │ │ │ │ Nullable(Bool │ |
| 43 | +│ │ │ │ │ │ │ │ │ │ │ │ ean), String, │ |
| 44 | +│ │ │ │ │ │ │ │ │ │ │ │ String))) │ |
| 45 | +├─────────┼────────────────┼────────┼────────────────┼────────────────┼────────────────┼────────────────┼───────────────┼───────────────┼───────────────┼───────────────┼───────────────┤ |
| 46 | +│ 0 │ s3://warehouse │ 9241 │ 0 │ 75657674165904 │ 2 │ 0 │ 0 │ 2 │ 0 │ 0 │ [] │ |
| 47 | +│ │ /catalog_retur │ │ │ 11866 │ │ │ │ │ │ │ │ |
| 48 | +│ │ ns/metadata/fa │ │ │ │ │ │ │ │ │ │ │ |
| 49 | +│ │ 1ea4d5-a382-49 │ │ │ │ │ │ │ │ │ │ │ |
| 50 | +│ │ 7a-9f22-1acb9a │ │ │ │ │ │ │ │ │ │ │ |
| 51 | +│ │ 74a346-m0.avro │ │ │ │ │ │ │ │ │ │ │ |
| 52 | +╰───────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯ |
| 53 | +``` |
0 commit comments