# What is DuckLake?

DuckLake is an open table format for data lakes. It stores table data in Parquet files and tracks schemas, snapshots, file lists, and statistics in a SQL database. Each commit uses one SQL transaction. Small inserts can stay in the database until DuckLake writes them to Parquet. The DuckDB team created DuckLake and released the specification and extension under the MIT license.

The current version is DuckLake 1.1, released with DuckDB 2.0 on 2026-10-21. DuckLake 1.0, the first release with a backward-compatibility guarantee, shipped in April 2026.

## How it works

```text
catalog database (DuckDB file, SQLite or PostgreSQL)
  ducklake_snapshot, ducklake_table, ducklake_data_file, ducklake_column, ...
          │  one SQL transaction per commit
          ▼
data path (s3://<bucket>/lake/, gs://..., or a local folder)
  main/events/ducklake-<uuid>.parquet
```

- **Catalog.** Any database with transactions and primary keys can hold the metadata. The DuckDB extension supports a DuckDB file, SQLite and [PostgreSQL](../querying/postgres.md#ducklake-catalogs-in-postgresql). Use PostgreSQL when more than one process writes.
- **Data.** Parquet files, never modified in place. Deletes go to separate delete files.
- **Commit.** A writer uploads the Parquet files, then inserts rows describing them in a single transaction. Readers see the new snapshot when the transaction commits, and multi-table changes are atomic.
- **Inlining.** Small inserts, ten rows or fewer by default, are written to the catalog instead of to a new Parquet file, and flushed to Parquet later. Frequent small commits do not create thousands of tiny files.

## Try it in DuckDB

DuckDB 2.0 or later, with a local catalog file and data folder:

```sql
INSTALL ducklake; LOAD ducklake;
ATTACH 'ducklake:metadata.ducklake' AS lake (DATA_PATH 'data/');
USE lake;

CREATE TABLE events (event VARCHAR, user_id VARCHAR, cents INTEGER, ts TIMESTAMPTZ);
INSERT INTO events VALUES ('signup', 'u_1', NULL, '2026-11-28 09:00:00+00');
INSERT INTO events VALUES ('order.paid', 'u_1', 4200, '2026-11-28 09:05:00+00'),
                          ('order.paid', 'u_2', 1900, '2026-11-28 09:07:00+00');
```

Every commit is a snapshot. Query the table as it was, or list what changed between snapshots:

```sql
FROM lake.snapshots();                               -- 0 schema, 1 table, 2 and 3 inserts
SELECT count(*) FROM events AT (VERSION => 2);       -- 1
SELECT count(*) FROM events;                         -- 3
FROM lake.table_changes('events', 3, 3);             -- the two order.paid rows, change_type 'insert'
```

Use `AT (TIMESTAMP => now() - INTERVAL '1 hour')` to read the table as it stood an hour ago. DuckLake also records schema changes as commits. For example, `ALTER TABLE events ADD COLUMN plan VARCHAR` changes the schema without rewriting the data files.

For object storage, create a DuckDB secret for the bucket and attach with a PostgreSQL catalog:

```sql
ATTACH 'ducklake:postgres:host=<host> dbname=<database> user=<user>' AS lake
  (DATA_PATH 's3://<bucket>/lake/');
```

## DuckLake compared with Apache Iceberg

Both formats store data as Parquet and both give you snapshots, time travel, schema evolution and hidden partitioning. They differ in where metadata lives.

| | DuckLake | Apache Iceberg |
|---|---|---|
| Metadata | Rows in a SQL database | `metadata.json`, manifest lists and manifests in object storage |
| Catalog | The same SQL database | A separate service (REST catalog, Glue, Polaris) that points at the current metadata file |
| A commit writes | Parquet files plus one transaction | Parquet files plus a new metadata file, manifest list and manifests, then a catalog swap |
| Planning a query | One query against the catalog | Several reads: catalog, metadata file, manifest list, manifests |
| Small, frequent commits | Inlined in the catalog until flushed | Many small files and a growing snapshot list; needs regular compaction |
| Multi-table transactions | Yes | Only through catalogs that support them, such as REST multi-table commits |
| Engines | DuckDB and MotherDuck; early clients for DataFusion, [Spark](../querying/spark.md), [Trino](../querying/trino.md) and PostgreSQL | [Spark](../querying/spark.md), [Trino](../querying/trino.md), [Snowflake](../querying/snowflake.md), [Athena](../querying/athena.md), [BigQuery](../querying/bigquery.md), [ClickHouse](../querying/clickhouse.md), [DuckDB](../querying/duckdb.md) and most others |
| Spec maturity | First released 2025; 1.0 in April 2026 | Format version 3; in wide production use |

DuckLake's data files and position delete files use Iceberg-compatible Parquet, so a table can move between the formats by rewriting metadata only. [DuckLake 0.3](https://ducklake.select/2025/09/17/ducklake-03/) added a metadata-only Iceberg import and a copy back to Iceberg in DuckDB.

## When to use which

- **Pick DuckLake** when DuckDB or MotherDuck is the main reader, you already run PostgreSQL, and you write often in small batches, such as streaming events. There is no catalog service to run and compaction is rarely needed.
- **Pick Iceberg** when several engines must read the table, especially warehouses such as [Snowflake](../querying/snowflake.md) or [BigQuery](../querying/bigquery.md), or your platform already has a REST catalog or S3 Tables.
- **Not sure?** Plain gzip NDJSON objects in a bucket are readable by every engine and can be loaded into either format later.

## Maintenance

DuckLake never deletes data files on its own. Run maintenance on a schedule:

```sql
CALL ducklake_flush_inlined_data('lake');
CALL ducklake_merge_adjacent_files('lake');
CALL ducklake_expire_snapshots('lake', older_than => now() - INTERVAL '7 days');
CALL ducklake_cleanup_old_files('lake', older_than => now() - INTERVAL '7 days');
```

`CHECKPOINT;` runs all of them with the catalog's configured options. A PostgreSQL catalog also needs the occasional `VACUUM`. Expiring snapshots limits how far back time travel and `table_changes` can reach.

## Where Send2Bucket fits

Send2Bucket writes JSON events and OpenTelemetry logs, spans and metrics to a [DuckLake destination](../destinations/ducklake.md): your PostgreSQL catalog and your bucket, one DuckLake transaction per delivery batch. [Stream events and OpenTelemetry into DuckLake](../guides/ducklake-ingestion.md) covers setup, queries and maintenance, and [Apache Iceberg](../destinations/iceberg-rest.md) is the destination for the same data in Iceberg.

## Notes

- The snippets above ran on DuckDB 2.0.1 with a local DuckDB catalog file.
- Third-party DuckLake clients are at different levels of maturity; check the [DuckLake documentation](https://ducklake.select/docs/stable/) for the versions each supports.

## Sources

Checked 2026-11-28:

- [DuckLake specification, version 1.1](https://ducklake.select/docs/stable/specification/introduction)
- [The DuckLake manifesto](https://ducklake.select/manifesto/)
- [DuckLake 1.0](https://ducklake.select/2026/04/13/ducklake-10/) and [DuckLake 1.1](https://ducklake.select/2026/10/21/ducklake-11/) release posts
- [Data inlining](https://ducklake.select/docs/stable/duckdb/advanced_features/data_inlining), [time travel](https://ducklake.select/docs/stable/duckdb/usage/time_travel), [data change feed](https://ducklake.select/docs/stable/duckdb/advanced_features/data_change_feed) and [recommended maintenance](https://ducklake.select/docs/stable/duckdb/maintenance/recommended_maintenance)
- [Iceberg table specification](https://iceberg.apache.org/spec/) and [REST catalog protocol](https://iceberg.apache.org/docs/nightly/rest-protocol/)
