How teoria/iceduck works
Project type and purpose
• This is a Python library (“iceduck”) that wraps DuckDB and provides an Iceberg‐compliant writer/reader layer on top of it.
• It is intended to be used by other Python applications or scripts to (a) run SQL against DuckDB, and (b) write/read tables in Apache Iceberg format using a local SQLite meta‐store and file‐based warehouse.
File structure
• Top‐level:
• README.md – describes usage patterns
• main.py – likely a demo or CLI entry point for testing
• pyproject.toml – build & publish config
• .github/workflows/python-publish.yml – CI/CD for PyPI publishing
• src/iceduck:
• __init__.py – package initializer, exposes connect() wrapper
• iceberg.py – core implementation of Iceberg integration
• warehouse/ – placeholder for file‐based Iceberg warehouse (populated at runtime)
README for additional insights
• Two usage modes:
1. Plain DuckDB SQL via iceduck.connect()
2. DuckDB + Iceberg: load a “local” catalog (SQLite), create namespace, upsert to Iceberg table, then read Iceberg table.
• Underlying technologies: DuckDB’s Python API, PyIceberg (via con.load_catalog), SQLite as metadata catalog, local FS warehouse.
Detail
• How CI/CD and packaging fits (optional inset): GitHub Actions → PyPI Publishing (pyproject.toml).