cloudparts

DuckDB

An in-process analytical SQL database: a library with no server that queries Parquet, CSV, Iceberg and S3 directly.

Type
Open source
Made by
DuckDB Foundation and DuckLabs
License
MIT
Facts checked
23 October 2026

What it is

DuckDB runs inside your process, the way SQLite does, but it’s built for analytics: columnar storage and a vectorised engine that works on batches of values in parallel threads, spilling to disk when a query outgrows memory. It has no external dependencies and installs as a library for Python, R, Java or Node.js, or as a single command-line binary. A database is one file, or you can skip that and query files where they are: SELECT ... FROM 's3://bucket/*.parquet'.

Extensions add formats and storage. httpfs reads and writes S3 and HTTP; iceberg reads Iceberg tables and writes them through a REST catalog; delta reads and writes Delta Lake using the Delta Kernel library; postgres queries a live PostgreSQL database; and ducklake attaches DuckLake catalogs. The current release is 2.0.0, out on 21 October 2026 and itself a long-term support release; the previous LTS line, 1.4, is supported until 17 November 2026.

Why teams pick it

  • Zero setup: pip install duckdb and you have a fast columnar engine
  • Reads Parquet, CSV, JSON, Iceberg and Delta Lake in place, locally or on S3, reading only the columns and row groups it needs
  • Larger-than-memory queries spill to disk, so one laptop or VM goes a long way
  • MIT licensed, with the IP held by the non-profit DuckDB Foundation

Watch out for

  • One machine only: it scales up, not out
  • Only one process can write to a database file at a time; it isn’t a shared server for many users
  • Iceberg writes need a REST catalog; reading a table by its path is read-only
  • Built for analytics, not many small transactional writes; use PostgreSQL or SQLite for app data

Good for

Data model
Relational tables
Query language
SQL
How it scales
One machine: parallel threads and larger-than-memory spilling; it scales up, not out
Storage format
Columnar, in one database file; queries Parquet, CSV, JSON, Iceberg and Delta Lake in place
Written in
C++
Ways to run it
A library for Python, R, Java, Node.js and more, or a single command-line binary

The DuckDB family

1 technologies built from or on DuckDB

Alternatives

What all query engines have in common →Compare side by side →
chDBOpen sourceAlso good for inside the application process and scans and aggregations over billions of rowsThe ClickHouse engine packaged as a library: run ClickHouse SQL inside a Python, Go, Rust or Node.js program, with no server.PolarsOpen sourceAlso good for scans and aggregations over billions of rows and inside the application processA DataFrame library with a Rust query engine underneath: you write Python (or Rust, SQL, Node.js, R) and it plans, optimises and runs the query on every core, streaming data bigger than memory.Apache DataFusionOpen sourceAlso good for scans and aggregations over billions of rows and inside the application processA query engine library in Rust, built on Arrow, that other projects embed and extend to build their own databases and data tools.+1 Apache DataFusion CometClickHouseOpen sourceAlso good for scans and aggregations over billions of rowsAn open-source column-oriented database for real-time analytics, fast enough to serve dashboards over billions of rows.CedarDBCommercialAlso good for scans and aggregations over billions of rowsA PostgreSQL-compatible database rebuilt from scratch at TU Munich, running transactions and analytics on one copy of the data on a single server.SQLiteOpen sourceAlso good for inside the application processA complete SQL database in a library and a single file, with no server to run.ArcOpen sourceA young single-binary time-series database in Go that writes incoming data as Parquet files and queries them with DuckDB SQL.Apache Arrow AceroExperimentalOpen sourceThe streaming execution engine inside Arrow’s C++ library: you hand it an exact plan of nodes (scan, filter, project, aggregate, join, sort) and it streams Arrow record batches through them, with no SQL parser or optimizer of its own.Apache DrillOpen sourceA distributed SQL engine, inspired by Google’s Dremel, that queries JSON, Parquet, CSV files and NoSQL stores in place without defining a schema first.DuckFlightPreviewOpen sourceA DuckDB community extension that turns a running DuckDB database into a server: PostgreSQL clients and Arrow Flight SQL clients can connect, authenticate and query the same live database.GizmoSQLOpen sourceAlso good for scans and aggregations over billions of rowsA database server that wraps DuckDB (or SQLite) and serves it to many clients over Arrow Flight SQL, with TLS and authentication.GlareDBDormantOpen sourceA small, embeddable SQL engine in Rust for querying Parquet and CSV files locally, over HTTP or in S3 and GCS, from a CLI, Python or the browser. It began as a DataFusion-based federated query service and was rewritten in 2025 on its own engine, and it has had no release since June 2025.HotdataCommercialA managed SQL engine for AI agents, built in Rust on Apache DataFusion and Arrow: each agent gets short-lived “instant databases” to load data into, then runs read-only SQL, vector, full-text and geospatial queries over an HTTP API or CLI.RayforceOpen sourceAlso good for inside the application process and scans and aggregations over billions of rowsA small embeddable engine in pure C that runs columnar analytics, graph traversals and recursive Datalog queries in one optimised plan.MotherDuckCommercialAlso good for scans and aggregations over billions of rowsA serverless cloud data warehouse built on DuckDB, where one query can run partly on your laptop and partly in the cloud.PivotOpen sourceAlso good for scans and aggregations over billions of rowsA young open-source analytics server in Rust that speaks the PostgreSQL protocol and queries Iceberg and Delta Lake tables straight from object storage.Spice.ai OSSOpen sourceA single-binary SQL engine in Rust, built on DataFusion and Arrow, that federates queries across databases, warehouses and lakes, keeps hot datasets in a local accelerated copy, and adds search and LLM APIs on top.

How it fits with other technologies

What uses DuckDB

Query Parquet and Iceberg on S3, then write results back · sql

CREATE SECRET (TYPE s3, PROVIDER credential_chain);

SELECT country, count(*) AS orders
FROM 's3://acme-raw/orders/2026/*.parquet'
GROUP BY country ORDER BY orders DESC LIMIT 10;

INSTALL iceberg;
SELECT count(*) FROM iceberg_scan('s3://acme-lake/warehouse/sales/orders');

COPY (FROM 's3://acme-raw/orders/2026/*.parquet' WHERE amount > 100)
  TO 's3://acme-lake/big-orders' (FORMAT parquet, PARTITION_BY (country));

Python functions in SQL#

con.create_function(name, function, parameters, return_type) registers a Python function that SQL can call like a built-in. Types can be given as arguments or read from the function’s annotations; the return type is required one way or the other. The default type="native" calls the function once per row with plain Python values, which suits libraries that know nothing about Arrow. type="arrow" passes pyarrow arrays of up to 2,048 values and expects an array back, which is generally much faster. By default a NULL argument gives NULL without calling the function, and a Python exception fails the query (null_handling="special" and exception_handling="return_null" change that). DuckDB assumes the function is pure and may call it once and reuse the result, so pass side_effects=True for anything random or stateful. Registration needs NumPy installed; con.remove_function(name) drops a function again. Tested with DuckDB 2.0.0.

python
import duckdb
import pyarrow.compute as pc
from duckdb.sqltypes import VARCHAR

def domain(url: str) -> str:            # native: called once per row
    return url.split("/")[2]

def shout(s):                           # arrow: gets batches of up to 2,048 values
    return pc.utf8_upper(s)

con = duckdb.connect()
con.create_function("domain", domain)   # types come from the annotations
con.create_function("shout", shout, [VARCHAR], VARCHAR, type="arrow")

print(con.sql("""
    SELECT domain(url) AS site, shout(domain(url)) AS loud
    FROM (VALUES ('https://duckdb.org/docs'), (NULL)) t(url)
""").fetchall())
# [('duckdb.org', 'DUCKDB.ORG'), (None, None)]   NULL in, NULL out by default

Hive-partitioned folders#

Many lakes keep one folder per partition value, such as orders/year=2026/month=10/. With hive_partitioning = true, read_parquet turns those folder names into columns, and DuckDB switches it on by itself when it sees key=value folders. A filter on a partition column is pushed into the scan, so folders that can’t match are never opened. Values that look like dates, timestamps or integers get those types (hive_types sets them explicitly, hive_types_autocast = 0 turns the guessing off). COPY ... TO with PARTITION_BY writes the same layout; it takes column names only, so compute a derived key such as the year in the query first. The partition values live in the folder names, not inside the Parquet files.

sql
-- write one folder per value: s3://acme-lake/orders/year=2026/month=10/data_0.parquet
COPY (SELECT *, year(day) AS year, month(day) AS month FROM orders)
  TO 's3://acme-lake/orders' (FORMAT parquet, PARTITION_BY (year, month));

-- read: folder names come back as columns, and the filter skips other folders
SELECT region, sum(amount) AS total
FROM read_parquet('s3://acme-lake/orders/*/*/*.parquet', hive_partitioning = true)
WHERE year = 2026 AND month = 10
GROUP BY region;

See it in a real stack

Small lakehouse on DuckLake →
Live model
What you’re watchingA nightly load writes new rows: DuckLake commits the snapshot to PostgreSQL and the data to S3 as Parquet. Analysts’ queries look up the current files in the catalog and read them from S3.

Worth exploring

WebsiteAwesome DuckDBDavid Gasquez and contributors, on GitHubA community-curated list of more than 400 DuckDB links: client APIs, core and community extensions, BI and ETL tools built on DuckDB (grouped by commercial, open core and open source), WebAssembly and SQL clients, plus talks, podcasts, blog posts and books. Use it to find what already exists around DuckDB; entries arrive by pull request with one-line descriptions, so judge each project yourself.
All resources →

Benchmarks

Benchmark · ClickHouse Inc.ClickBenchHow fast analytical databases run 43 SQL queries over one 100-million-row table of web analytics events, on the same cloud machines.Includes DuckDB · 7 caveats to read first
How to read a benchmark →
Where it came from2018–2026

By the late 2010s, a data scientist with a few gigabytes in R or pandas had two poor options. A database server meant installing, configuring and loading data through a slow client protocol. SQLite ran inside the program with no setup, but it was built for transactions, with a row-by-row engine over B-trees, so analytical queries ran very slowly. The dataframe tools themselves offered relational-style operators but no query optimiser.

Mark Raasveldt and Hannes Mühleisen, database researchers at CWI in Amsterdam, had already built MonetDBLite, an embedded version of the MonetDB analytical database. It was popular, used from the Dutch central bank to the New Zealand police, but adapting a system that wasn’t built for embedding caused problems that were hard to fix. In 2018 they started again from scratch: a purpose-built analytical database that runs inside another program, as SQLite does. They presented DuckDB at SIGMOD 2019 in Amsterdam, MIT licensed from the start.

In 2021 the founders spun off a company from CWI, DuckDB Labs, to employ the core engineering team, and set up the non-profit DuckDB Foundation to hold most of the IP. DuckDB 1.0 arrived in June 2024 with a file format that later versions promise to keep reading. In May 2026 DuckDB Labs renamed itself DuckLabs. In August 2026 DuckLabs announced it would join AWS as a new subsidiary, expected to take effect in early September; DuckDB, DuckLake and Quack stay MIT licensed under the stewardship of the DuckDB Foundation.

Why it’s built this way

Run inside the host process, like SQLite
An embedded library needs no server, and because the database and application share memory, tables can move between DuckDB and pandas or R without being copied over a socket.
A columnar, vectorised engine instead of SQLite’s row engine
Analytical queries touch a few columns across many rows. Processing columns in batches of values uses the CPU far better than handling one row at a time.
No external dependencies, and never crash the host
MonetDBLite taught them that depending on external libraries caused trouble and that an embedded database that crashes takes the user’s program down with it. Queries that run out of memory must abort cleanly.

Timeline

  1. 2018

    First code written at CWI in Amsterdam

  2. 2019

    First release; demo paper at SIGMOD in Amsterdam

  3. 2021

    DuckDB Labs spins off from CWI; the DuckDB Foundation is set up

  4. 2024

    DuckDB 1.0 in June, with a stable storage format

  5. 2025

    1.4.0 ships as a long-term support release; every other version will be LTS

  6. 2026

    DuckLake 1.0 in April; DuckDB Labs becomes DuckLabs in May; DuckLabs announces in August it will join AWS; 2.0.0 LTS in October

Sources19 · facts checked 23 October 2026

Improve this page on GitHub