Skip to content

[Bug] Cross lakehouse write outputting to different locations for models vs snapshots #83

@iShaymus

Description

@iShaymus

Is this a new bug?

  • I believe this is a new bug
  • I have searched the existing issues, and I could not find an existing issue for this bug

Current Behavior

When attempting to utilise the new cross lakehouse write introduced in 1.9.4 there is different behaviour between the output of models vs snapshots. Models will output to the correct database and schema where as Snapshots will output to the profiles.yml database but in the specified target schema.

I have three lakehouses

  • lh_bronze
  • lh_silver
  • lh_gold

A model table targeted at database='lh_silver', schema='dbo' does in fact end up in lh_silver.dbo.{table_name}.
A snapshot table targeted at the same database and schema ends up in lh_bronze.dbo which is where the profiles.yml connection is pointed.

Expected Behavior

Both models and snapshots should end up in the correction database and schema as specified in their respective config e,g, database='lh_silver', schema='dbo' should result in either a model or snapshot ending up in lh_silver.dbo.{table_name}.

Steps To Reproduce

Configure profile.yml to connect to lh_bronze

Model table config

{{
    config(
        database='lh_silver',
        schema='dbo',
        materialized='table'
    )
}}

... table select statement ...

Snapshot table config

{% snapshot my_table_snap %}
{{
    config(
        database='lh_silver',
        schema='dbo',
        unique_key=['a_unique_key'],
        strategy='check',
        check_cols='all'
    )
}}

... table select statement ...

{% endsnapshot %}

Run dbt build

Check the respective lakehouses. The model will be in the intended location, the snapshot will be in the lh_bronze

Relevant log output

Environment

- OS: macOS 26.3.1
- Python: 3.12
- dbt-core: 1.11.8
- dbt-fabricspark: 1.9.5

Additional Context

No response

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions