- Documentation
- Overview
- Specification
- Introduction
- Data Types
- Queries
- Tables
- Overview
- column
- column_mapping
- column_tag
- data_file
- delete_file
- file_column_stats
- file_partition_value
- file_variant_stats
- files_scheduled_for_deletion
- inlined_data_tables
- macro
- macro_impl
- macro_parameters
- metadata
- name_mapping
- partition_column
- partition_info
- schema
- schema_versions
- snapshot
- snapshot_changes
- sort_expression
- sort_info
- table
- table_column_stats
- table_stats
- tag
- view
- view_column_tag
- DuckDB Extension
- Introduction
- Installation
- Usage
- Connecting
- Choosing a Catalog Database
- Choosing Storage
- Snapshots
- Schema Evolution
- Time Travel
- Upserting
- Configuration
- Paths
- Maintenance
- Recommended Maintenance
- Merge Files
- Expire Snapshots
- Cleanup of Files
- Rewrite Files with Deletes
- Checkpoint
- Advanced Features
- Constraints
- Conflict Resolution
- Data Change Feed
- Data Inlining
- Deletion Vectors
- Encryption
- Partitioning
- Transactions
- Row Lineage
- Macros
- Nested Schemas
- Views
- Comments
- Sorted Tables
- Logging
- Metadata
- Migrations
- Guides
- Overview
- Access Control
- Backups and Recovery
- Public DuckLake on Object Storage
- Using a Remote Data Path
- Troubleshooting
- Unsupported Features
- FAQ
DuckLake runs in DuckDB through the ducklake extension. To get started, install the latest DuckDB release, choose a catalog database below and run the commands in DuckDB. For guidance on picking a catalog database, see Choosing a Catalog Database.
Install DuckLake
INSTALL ducklake;
ATTACH 'ducklake:metadata.ducklake'
AS my_ducklake
(DATA_PATH 'data/');
USE my_ducklake;A DuckDB catalog can only be attached by one DuckDB process at a time, unless every process attaches it in read-only mode.
INSTALL ducklake;
INSTALL sqlite;
ATTACH 'ducklake:sqlite:metadata.sqlite'
AS my_ducklake (DATA_PATH 'data/');
USE my_ducklake;A SQLite catalog can be used by multiple local DuckDB processes. SQLite allows one writer at a time and DuckLake retries on lock conflicts.
INSTALL ducklake;
INSTALL postgres;
ATTACH 'ducklake:postgres:dbname=your_db host=your_host'
AS my_ducklake (DATA_PATH 'data/');
USE my_ducklake;The ducklake_catalog database must exist in PostgreSQL. DuckLake requires PostgreSQL 12 or newer.
-- Server: open the catalog database file
-- (e.g., duckdb metadata.ducklake) and run:
INSTALL quack;
CALL quack_serve('quack:localhost');
-- Client: use the token returned by quack_serve
INSTALL ducklake;
INSTALL quack;
CREATE SECRET (TYPE quack, TOKEN 'your_token',
SCOPE 'quack:localhost');
ATTACH 'ducklake:quack:localhost'
AS my_ducklake (DATA_PATH '/path/to/shared/data/');
USE my_ducklake;Both the catalog database and the clients are DuckDB instances: a DuckDB server process hosts the catalog database and DuckDB clients connect to it over the network using the Quack protocol. The default port is 9494. All clients need access to the data files, so use an absolute path or an object storage URL as the DATA_PATH.