parquet_get_metadata_items Interface

interface
public module subroutine parquet_get_metadata_items(reader, keys, values)

Arguments

Type IntentOptional Attributes Name
type(parquet_reader), intent(in) :: reader

open reader.

character(len=:), intent(out), allocatable :: keys(:)

one entry per metadata item, stored order.

character(len=:), intent(out), allocatable :: values(:)

that item's value, same order.

Description

Every key/value metadata entry the file carries, in the order it is stored.

parquet_get_metadata answers for a key you already know; this reports what is there at all, which is what a caller copying metadata from one file to another needs (it is how parquet_table snapshots a file's metadata at open, so that %get_file_metadata keeps working after the table has detached from its file, and how parquet_write_table's copy_metadata= carries it to an output file).

keys and values are index-aligned and each is allocated to its own longest entry, blank-padded, so trim(keys(i)) is the key to pass on -- the same convention parquet_get_column_names uses. Both come back zero-size for a file with no metadata. Reads nothing: the answer comes from the copy parquet_open_reader already made of the file's footer metadata.