DuckDB
Use DuckDB for local analytics, CI, and laptops. Mfd writes Iceberg tables under warehouse and names them with table_namespace. The destination publishes those tables on the first compact.
Before you begin
- A directory Mfd can create, as a
file:///URI (three slashes + absolute path). - Enough disk for the tables plus the write-ahead log.
Configure
python
from mfd import Config, DataSinkDuckdb, Pipeline
cfg = Config.discover()
local = cfg.data_sink(
"local",
DataSinkDuckdb(warehouse="file:///var/lib/mfd/duckdb", table_namespace="bronze"),
)
cfg.pipeline("bikehire", Pipeline(data_source=cfg.get_data_source("sample"), data_sink=local))
cfg.save()bash
mfd connect data-sink duckdb \
--pipeline bikehire \
--name local \
--warehouse file:///var/lib/mfd/duckdb \
--table-namespace bronzeyaml
data_sinks:
local:
Duckdb:
warehouse: file:///var/lib/mfd/duckdb
table_namespace: bronzeOptions
| Key | Type | Required/Default | Description |
|---|---|---|---|
warehouse | URI | Required | Iceberg root, usually file:///… |
table_namespace | string | Not set | Iceberg namespace for tables |
How data lands
Supports append and replace_table. It does not replace_partition or merge_by_key. Use ManifoldLake or Athena Iceberg for those. Retries are exactly once. Tables exist after the first compact. mfd query reads the local tables plus in-flight WAL rows.
Troubleshooting
| Symptom | Fix |
|---|---|
| Warehouse path rejected | Use an absolute file:/// URI |
Source refuses replace_partition | Point that source at Iceberg in S3, or set write_policy: append when the source allows it |
| Disk full | Free space on warehouse and DATA_DIR |
