Skip to content

Parquet exchange ​

Parquet is a columnar interchange file. Use it when the consumer accepts its schema and value mappings, and inspect the format's conversion rules before exporting native values.

Export and import ​

  1. Run SELECT FORMAT parquet through native --query and redirect stdout to a file.
  2. Create an explicit destination table with the intended types.
  3. Load the file with native FROM INFILE or stdin and FORMAT parquet.
  4. Query the destination to verify rows and values.

A server file() relation also needs a column/type schema for ordinary Parquet input. Compression, page, row-group and conversion options are statement SETTINGS rather than persisted SET values.

Inspect metadata ​

To read the footer rather than data rows, use the input-only parquet_metadata format:

text
SELECT num_rows
FROM file('sample.parquet', parquet_metadata);

The file must exist under user_files_path. This metadata source supplies its fixed schema without a third argument, including file, row-group and column-chunk fields.

See Parquet for complete round-trip commands and Parquet metadata for the footer schema.