read_parquet is a DuckDB table function for querying Parquet files directly. It uses Parquet’s embedded schema to derive column names and types, while keeping the data available to ordinary SQL queries. section 5.2 section 10.4.2
Use the function when the input selection or workflow needs explicit control:
- Query one file explicitly instead of relying on filename-extension inference. section 10.4.2
- Pass a list of files to combine selected Parquet datasets and unify their schemas. section 5.2 section 10.4.2
- Let metadata answer counts quickly without reading the full data payload. section 10.4.2
Count selected Parquet files
SELECT count(*) FROM read_parquet([ 's3://.../yellow_tripdata_2021-06.parquet', 's3://.../yellow_tripdata_2022-06.parquet' ]); -- 6,392,388
