You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
sqlmesh init -t dlt / dlt_refresh does not recognise dlt ducklake destination #5914
This appears to be destination-type mapping logic in the dlt integration path, where dlt.destinations.ducklake is present in dlt pipeline state but not recognised by SQLMesh. I do not experience this issue where dlt.destinations.ducklake is present the dlt pipeline.
I Reproduced with dlt 1.30.0 and sqlmesh main: sqlmesh init -t dlt passes the dlt destination name straight through as the SQLMesh connection type, and ducklake is not one.
I have a fix that generates a duckdb gateway with the lake attached as a ducklake catalog (path, data_path and metadata_schema mirror dlt's own ATTACH for duckdb, sqlite, postgres/mysql and MotherDuck catalogs). With it, sqlmesh plan against the generated project reads the lake. Opening a PR now, will adjust if you'd rather map it differently plz lmk
I reproduced this on main (849d6ed). A `ducklake` destination falls through the generic credentials path and produces an invalid gateway config, which then surfaces from `connection.py` as `ConfigError: Unknown connection type 'ducklake'.` — the same message raised for a genuinely unknown type, so the real diagnostic is lost.
DuckLake is a DuckDB gateway with the lake attached as a catalog, so that block needs to be built explicitly. While fixing it I also found that the config scalars (catalog database, storage URL, name, metadata schema) were interpolated into the YAML unquoted, so a path containing a leading quote or a newline produced invalid YAML and the generated project would not load.
I have a fix with tests ready and will open a PR shortly. One scope note for that PR: unsupported catalog drivers now raise a clear `ClickException`, and I have documented the remaining generic case (any other unrecognised `db_type` still raises the generic `ConfigError` at that boundary) rather than widening this change — happy to widen it here if you would rather I did.
Activity
kingjaiteh commentedon Sep 7, 2026
I Reproduced with dlt 1.30.0 and sqlmesh
main:sqlmesh init -t dltpasses the dlt destination name straight through as the SQLMesh connection type, andducklakeis not one.I have a fix that generates a
duckdbgateway with the lake attached as aducklakecatalog (path,data_pathandmetadata_schemamirror dlt's own ATTACH for duckdb, sqlite, postgres/mysql and MotherDuck catalogs). With it,sqlmesh planagainst the generated project reads the lake. Opening a PR now, will adjust if you'd rather map it differently plz lmkAnnasMazhar commentedon Oct 4, 2026
I reproduced this on main (849d6ed). A `ducklake` destination falls through the generic credentials path and produces an invalid gateway config, which then surfaces from `connection.py` as `ConfigError: Unknown connection type 'ducklake'.` — the same message raised for a genuinely unknown type, so the real diagnostic is lost.
DuckLake is a DuckDB gateway with the lake attached as a catalog, so that block needs to be built explicitly. While fixing it I also found that the config scalars (catalog database, storage URL, name, metadata schema) were interpolated into the YAML unquoted, so a path containing a leading quote or a newline produced invalid YAML and the generated project would not load.
I have a fix with tests ready and will open a PR shortly. One scope note for that PR: unsupported catalog drivers now raise a clear `ClickException`, and I have documented the remaining generic case (any other unrecognised `db_type` still raises the generic `ConfigError` at that boundary) rather than widening this change — happy to widen it here if you would rather I did.