Query Parquet files with SQL
You can open an Apache Parquet file in Rowpilot and query it with SQL without importing it into a database first. The file becomes a data source with a table, and you filter, group and join it in the SQL editor.
File data sources are backed by DuckDB, so the SQL you write is DuckDB SQL. The file is opened in read mode and is never modified.
Open a Parquet file
- Click the main app menu →
Open local file - Pick the
.parquetfile (or enter its path) - Optionally adjust the data source name and the table name
- Click
Create
You can also drag the file onto the Rowpilot window. Rowpilot detects the columns and their types and shows them in the schema tree.
Write a query
Open a new query and use the table name you chose in the dialog. In this example the table is called events:
The editor completes table and column names from the schema, and the result opens in the grid below the editor.
Add more files as tables
A file data source is not limited to one table. You can add another file to it, and each file you add gets its own table that you can join with the others. The path can also be a glob pattern, so a set of files maps to one table.
- Go to the right sidebar schema tree
- Click the
Add data filebutton in the schema tree toolbar - Pick the file, or enter a path or a glob pattern
- Optionally adjust the table name
- Click
Add
With a second Parquet file added as the table users, you can join the two tables:
Query many Parquet files as one table
The path accepts a glob pattern, so a set of files with the same columns maps to one table. This works when you create the data source and when you add a file to it:
/data/events/events_*.parquet
Columns are matched by name across the files. See DuckDB documentation for details.
Parquet files in cloud storage
A Parquet file in AWS S3, Google Cloud Storage, Cloudflare R2, Azure or behind an HTTPS URL opens the same way through Open remote file. The data is streamed on demand when you run a query, so you do not download the file first. The steps are in Query files in S3 and cloud storage with SQL.
Save the result
Export a query result or a grid selection to Excel, CSV, TSV or JSON.
Limits
- Rowpilot opens files with the
.parquetextension - Table names must be valid SQL identifiers: they start with a letter or underscore and contain only letters, numbers and underscores
- File data sources are read-only, so the grid shows the data but does not edit it
