G.6. Чтение метаданных таблицы Iceberg (iceberg_metadata) #
Перед чтением метаданных таблиц Iceberg настройте расширение Iceberg.
Требуемые права: суперпользователь или администратор Postgres Pro AXE.
За подробной информацией об управлении доступом обратитесь к Главе 17.
Выполните следующую команду на сервере Postgres Pro AXE:
SELECT * FROM iceberg_metadata('путь', необязательные_параметры);
Здесь:
путь: путь к таблице Iceberg, метаданные которой требуется прочитать.необязательные_параметры: необязательные параметры, указанные в форматепараметр := значение.Доступные параметры:
allow_moved_paths: указывает, следует ли читать таблицы Iceberg, которые были перемещены в другой каталог.Возможные значения:
true;false.
Значение по умолчанию:
false.metadata_compression_codec: кодек сжатия, используемый при чтении файлов метаданных.Значение по умолчанию:
''— кодек сжатия не используется.snapshot_from_id: идентификатор снимка, связанного с таблицей Iceberg.Значение по умолчанию:
NULL— используется последний снимок.snapshot_from_timestamp: метка времени снимка, связанного с таблицей Iceberg.Значение по умолчанию:
NULL— используется последний снимок.version: версия файла метаданных таблицы Iceberg.Значение по умолчанию:
'?'— версия определяется автоматически.version_name_format: строка формата, определяющая, как значениеversionпреобразуется в имя файла метаданных таблицы Iceberg.Значение по умолчанию:
'v%s%s.metadata.json,%s%s.metadata.json'.
Postgres Pro AXE вернёт строки с метаданными таблицы Iceberg.
Пример G.8. Чтение метаданные таблиц Iceberg
SELECT * FROM iceberg_metadata('data/iceberg/table');
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');