Parquet is a column-oriented format that stores structured data with schema metadata. DuckDB can query it directly, applying column selection and predicate pushdown before loading data, making it useful for data lakes and one-off analysis. section 1.7.1 section 10.4
Use Parquet when you need to:
- Inspect an unfamiliar file as a table by retrieving its column names, types, and nullability with DESCRIBE. section 5.5
- Inspect physical and logical types, repetition information, and other internal schema details through parquet_schema. section 5.5
- Inspect row groups, statistics, compression, encodings, and compressed sizes through parquet_metadata. section 5.5
- Export tables with selectable codecs, row-group sizes, multithreaded output, or ordering chosen for later query performance. section 10.3
Query and export without staging tables
Inspect an ATP rankings file with `DESCRIBE FROM 'atp/atp_rankings.parquet';`, then query it like a table: `FROM 'atp/atp_rankings.parquet' SELECT max(rank), max(points), max(player_id), max(height);`. For a larger table, export with `COPY (FROM users) TO 'users.parquet' (FORMAT PARQUET, CODEC 'SNAPPY', ROW_GROUP_SIZE 100000);` and read it using `SELECT count(*) FROM read_parquet('users.parquet');`. section 5.5 section 10.3
DESCRIBE FROM 'atp/atp_rankings.parquet';
Run the supplied DESCRIBE query to see how a Parquet file exposes its schema as relational output. section 5.5
Listing 10.26 Exporting the users table to Parquet
COPY (FROM users) TO 'users.parquet' (FORMAT PARQUET, CODEC 'SNAPPY', ROW_GROUP_SIZE 100000); -- Run Time (s): real 10.582 user 62.737265 sys 65.422181
Use the supplied COPY statement as a concrete export template with SNAPPY compression and an explicit row-group size. section 10.3








