Skip to content

duckdb_iceberg

etl_craft.dialects.warehouse.duckdb_iceberg

DuckDB compute over an Iceberg REST catalog.

DuckDBIcebergWarehouse

Bases: DuckDBWarehouse

DuckDB compute, Iceberg storage through a REST catalog.

Each connection attaches the catalog under the profile's catalog name, with the object storage and catalog credentials registered as DuckDB secrets. The tables live in the catalog, not a local file, so writers are not serialized.

column_addition_problem

column_addition_problem(data_type: str) -> str | None

DuckDB Iceberg cannot add nested columns through ALTER TABLE.

present

present(profile: ConnectionProfile, secret: str, url: WarehouseUrl) -> Presented

Present nothing to DuckDB itself: the catalog login happens in on_connect.

on_connect

on_connect(dbapi_connection: Any, profile: ConnectionProfile, secret: str) -> None

Load the extensions, register the storage and catalog credentials, and attach.

The settings are written into DuckDB statements, so none may contain a quote. Object storage uses s3_key_id and s3_secret when both are set, else the AWS credential chain.

preserve_replacement_properties

preserve_replacement_properties(conn: Connection, target: str, candidate: str) -> None

Carry Iceberg properties and refuse layouts this CTAS cannot reproduce.

load_table_metadata

load_table_metadata(conn: Connection, schema: str, table: str) -> None

Load an Iceberg table's schema so information_schema.columns reports it.

DuckDB lists an attached Iceberg table lazily: until something reads the table, information_schema.columns holds one placeholder column named __ for it. Selecting no rows loads the real schema.