Summary
DuckDB iceberg_rest catalog attach works far enough for dbt seed, but dbt run table materialization fails during CTAS temp relation creation.
This blocks using an Iceberg REST catalog as a normal dbt model destination in the catalogs.yml v2 DuckDB flow.
related: duckdb/duckdb-iceberg#595
Repro
Using the dbt-fusion binary built from the dbt-labs/fs catalogs.yml v2 stack:
dbt-labs/fs#9420
dbt-labs/fs#9587
Configure an Iceberg REST catalog against local Lakekeeper:
catalogs:
- name: iceberg_demo
type: iceberg_rest
table_format: iceberg
config:
duckdb:
endpoint: "http://localhost:8181/catalog"
warehouse: "demo"
authorization_type: "NONE"
access_delegation_mode: "NONE"
attach_as: "iceberg_demo"
Then add a table model targeting that catalog:
{{ config(
materialized='table',
database='iceberg_demo'
) }}
select
4 as demo_order,
'iceberg_rest' as catalog_name,
'lakekeeper + minio' as storage_type
Run:
RUST_LOG=debug /path/to/fs/target/debug/dbt run \
--project-dir /path/to/jaffle-sandbox \
--profiles-dir /path/to/jaffle-sandbox \
--target catalog_showcase \
--target-path /tmp/jaffle-target-9587 \
--log-path /tmp/jaffle-logs-9587 \
--select iceberg_rest_catalog_demo
Actual
The model fails while creating the dbt temp relation:
Invalid Configuration Error: Table iceberg_rest_catalog_demo__dbt_tmp already exists
Expected
materialized='table' should create or replace the target Iceberg table, or the adapter/materialization path should use an Iceberg-safe temp relation flow.
Notes
Summary
DuckDB
iceberg_restcatalog attach works far enough fordbt seed, butdbt runtable materialization fails during CTAS temp relation creation.This blocks using an Iceberg REST catalog as a normal dbt model destination in the catalogs.yml v2 DuckDB flow.
related: duckdb/duckdb-iceberg#595
Repro
Using the dbt-fusion binary built from the
dbt-labs/fscatalogs.yml v2 stack:dbt-labs/fs#9420dbt-labs/fs#9587Configure an Iceberg REST catalog against local Lakekeeper:
Then add a table model targeting that catalog:
{{ config( materialized='table', database='iceberg_demo' ) }} select 4 as demo_order, 'iceberg_rest' as catalog_name, 'lakekeeper + minio' as storage_typeRun:
Actual
The model fails while creating the dbt temp relation:
Expected
materialized='table'should create or replace the target Iceberg table, or the adapter/materialization path should use an Iceberg-safe temp relation flow.Notes
dbt seed --full-refresh.