DuckDB Iceberg Writer
September 17, 2025 · View on GitHub
This repository shows how to use DuckDB 1.4.0 to write data into Apache Iceberg tables.
Requirements
- Docker 24 or newer
- Docker Compose V2
- Optional: DuckDB CLI 1.4.0 for running the SQL scripts locally
Getting Started
- Launch the local Iceberg dependencies:
docker compose up -d - Populate the Iceberg table by running the sample script:
duckdb < code.sql - Inspect the table contents or adjust the SQL in
code.sqlto experiment with different datasets.
If you prefer to run with MinIO as the object store, use docker-compose-minio.yml instead:
docker compose -f docker-compose-minio.yml up -d
Project Layout
code.sql– Example DuckDB statements that create and populate an Iceberg table.docker-compose.yml– Default Docker stack for running Iceberg services locally.docker-compose-minio.yml– Alternative stack that swaps in MinIO for object storage.duckdb-code/– Workspace that stores the sample DuckDB database and metadata files.
Next Steps
- Modify
code.sqlto write additional tables or experiment with Iceberg features such as partition evolution. - Point DuckDB at your own data files and run the same workflow to materialize Iceberg tables.