Free online tool
In developmentConvert Parquet to SQL
Generate CREATE TABLE and INSERT statements from a .parquet file — pick your dialect (PostgreSQL, MySQL, SQLite, SQL Server) and paste the result straight into a database client. Online tool coming soon; methods that work today are below.
Why convert Parquet to SQL?
Parquet is the format data warehouses and lakes love; SQL is what most actual applications run on. Common reasons to bridge the two:
- Seeding a development database with a real-world Parquet dump.
- Loading a Hugging Face / Kaggle dataset into Postgres for an app.
- Generating a schema (DDL) to reproduce in another system.
- Quickly turning an ML feature table into queryable rows.
How to do it manually
DuckDB → SQL dump
DuckDB can read a .parquet file and emit standard SQL inserts:
duckdb my.db <<EOF CREATE TABLE orders AS SELECT * FROM 'data.parquet'; .mode insert orders SELECT * FROM orders; EOF
PostgreSQL via pandas
import pandas as pd
from sqlalchemy import create_engine
df = pd.read_parquet("data.parquet")
engine = create_engine("postgresql://user:pass@localhost/db")
df.to_sql("orders", engine, if_exists="replace", index=False)SQLite via DuckDB COPY
duckdb -c "ATTACH 'app.sqlite' AS sqlite_db (TYPE sqlite);
CREATE TABLE sqlite_db.orders AS
SELECT * FROM 'data.parquet';"Parquet → SQL type mapping cheat-sheet
| Parquet | PostgreSQL | MySQL | SQLite |
|---|---|---|---|
| INT32 | INTEGER | INT | INTEGER |
| INT64 | BIGINT | BIGINT | INTEGER |
| FLOAT | REAL | FLOAT | REAL |
| DOUBLE | DOUBLE PRECISION | DOUBLE | REAL |
| BOOLEAN | BOOLEAN | TINYINT(1) | INTEGER |
| STRING (BYTE_ARRAY UTF8) | TEXT | VARCHAR / TEXT | TEXT |
| DATE | DATE | DATE | TEXT (ISO 8601) |
| TIMESTAMP | TIMESTAMP | DATETIME | TEXT (ISO 8601) |
| DECIMAL(p,s) | NUMERIC(p,s) | DECIMAL(p,s) | NUMERIC |