Skip to content

A practical example of using DuckDB to write tables into Apache Iceberg format. This repository demonstrates how to set up DuckDB with the Iceberg extension, connect to S3-compatible storage (e.g., MinIO), and create/manage Iceberg tables. Includes sample SQL scripts and configuration tips for local testing and data lake integration.

Notifications You must be signed in to change notification settings

dwickyfp/duckdb-iceberg-writer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DuckDB Iceberg Writer

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

  1. Launch the local Iceberg dependencies:
    docker compose up -d
  2. Populate the Iceberg table by running the sample script:
    duckdb < code.sql
  3. Inspect the table contents or adjust the SQL in code.sql to 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.sql to 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.

References

About

A practical example of using DuckDB to write tables into Apache Iceberg format. This repository demonstrates how to set up DuckDB with the Iceberg extension, connect to S3-compatible storage (e.g., MinIO), and create/manage Iceberg tables. Includes sample SQL scripts and configuration tips for local testing and data lake integration.

Topics

Resources

Stars

Watchers

Forks