G.6. Reading Iceberg Table Metadata (iceberg_metadata) #
Before reading Iceberg table metadata, configure the Iceberg extension.
Required privileges: Superuser or the Postgres Pro AXE administrator.
For more information about access management, refer to Chapter 17.
Execute the following command on the Postgres Pro AXE server:
SELECT * FROM iceberg_metadata('path', optional_parameters);
Where:
path: The path to the Iceberg table from which metadata must be read.optional_parameters: The optional parameters, specified in theparameter := valueformat.Available parameters:
allow_moved_paths: Specifies whether to read Iceberg tables that are moved to a different directory.Possible values:
truefalse
Default value:
false.metadata_compression_codec: The compression codec to use when reading metadata files.Default value:
''— no compression codec is used.snapshot_from_id: The ID of the snapshot associated with the Iceberg table.Default value:
NULL— the latest snapshot is used.snapshot_from_timestamp: The timestamp of the snapshot associated with the Iceberg table.Default value:
NULL— the latest snapshot is used.version: The version of the Iceberg table metadata file.Default value:
'?'— the version is determined automatically.version_name_format: The format string that determines how theversionvalue is converted to the Iceberg table metadata file name.Default value:
'v%s%s.metadata.json,%s%s.metadata.json'.
Postgres Pro AXE will return rows with the metadata of the Iceberg table.
Example G.8. Reading Iceberg Table Metadata
SELECT * FROM iceberg_metadata('data/iceberg/table');