Parquet analysis
Parquet vs CSV for SQL Analysis: Types, Columnar Reads, and Memory Limits
Parquet stores typed columns that engines can read selectively. See what that means for SQL analysis and where browser memory still sets the limit.
On This Page
Why Parquet works well for analytics
Parquet is a columnar file format designed for analytical queries. It stores schema information and is often smaller and faster to scan than equivalent CSV exports.
- Column types are preserved better than in plain text files.
- Analytical queries can read only the columns they need.
- Parquet is common in data warehouses, lakehouses, and Python/R workflows.
Parquet vs CSV at a glance
- Types: Parquet stores each column's type in the file. CSV stores text, so types are inferred when the file is read.
- Reads: Parquet is columnar, so an engine can read only the columns a query needs. CSV has to be parsed row by row.
- Size: Parquet compresses each column and is often much smaller than the same data exported as CSV.
- Editing: CSV opens in any text editor or spreadsheet. Parquet needs a tool that understands the format, such as DuckDB.
For SQL analysis this usually means fewer type surprises and faster scans with Parquet, while CSV stays the most portable format for sharing small results.
Add a Parquet file
- Open the SQL for Files editor.
- Add a .parquet file from your device.
- Inspect the table and schema in the Database sidebar.
- Write SQL against the generated table name.
Inspect schema before querying
Because Parquet stores typed columns, the schema view helps you quickly identify dates, numeric measures, dimensions, booleans, and nested fields.
SELECT *
FROM transactions
LIMIT 25;Run analytical queries
Parquet is strongest when you want to summarize large sets of rows by a smaller number of dimensions.
SELECT
date_trunc('month', order_date) AS month,
product_category,
SUM(revenue) AS revenue
FROM transactions
GROUP BY month, product_category
ORDER BY month, revenue DESC;Know the browser memory limits
Parquet can be efficient, but SQL for Files still runs inside browser memory. When you add a file, the app loads the whole file into a DuckDB table, so the memory you need depends on the full file rather than the columns a later query reads. Very large files may hit browser limits earlier than a native DuckDB process or server-side database.
Practical guidance
Start with focused queries that select only the columns you need, and export aggregated results instead of trying to display millions of rows.
Continue in the editor
Open SQL for Files to add your own CSV, JSON, or Parquet files and try these examples locally in your browser.
Related Learn SQL lessons
Related guides
What Is DuckDB WASM and Why Use It for Browser SQL?
DuckDB WASM brings an analytical SQL engine into the browser, enabling local file analysis without a server-side database.
Analyzing Sensitive Data in the Browser: What Stays Local and a Safety Checklist
Understand the local processing model behind SQL for Files and how to work safely with sensitive CSV, JSON, and Parquet files.
SQL Cheat Sheet for Data Analysis: Filter, Group, Join, Dates, and Ranking
One pattern per common analysis question, from previewing a new table to ranking rows inside groups, each linked to a lesson where you can practice it.