parquet_metadata
Description
One input row describing a Parquet file footer, including file, column and row-group metadata. With file(), the format supplies its fixed metadata schema without a third argument.
Input only. Select it with FORMAT parquet_metadata. Names ignore ASCII case; use the snake_case name shown here.
The input is a complete Parquet file, but the output relation describes its footer rather than its data rows. It includes file-level counts and nested column and row-group records.
file() can supply the fixed schema automatically. With an explicit target, only known metadata fields are accepted and ordinary target conversions apply. This format has no result encoder.
INSERT INTO table [(columns)] [SETTINGS ...] FORMAT parquet_metadata
<data>Example usage
SELECT name,is_input,is_output FROM system.formats WHERE name='parquet_metadata' FORMAT csv;"parquet_metadata",1,0Format settings
Use a statement SETTINGS clause; these options are not persisted by SET.
| Setting | Type | Default | Meaning |
|---|---|---|---|
snappy_mode |
String |
basic |
Read Snappy client files as basic (Hadoop blocks) or framed (standard streaming format). |
Inspect a file
Run these commands from the server configuration directory with the default user_files_path. They create a one-column, one-row Parquet file under the server file root and inspect its footer.
mkdir -p user_files
./coordinator client --database data --query "SELECT CAST(7 AS Int64) AS id FORMAT parquet" > user_files/sample.parquet
./coordinator client --database data --query "SELECT num_rows,num_columns,num_row_groups FROM file('sample.parquet',parquet_metadata) FORMAT csv"1,1,1