microsoft / dbt-fabric

MIT License
79 stars 28 forks source link

Schema name being concatinated instead of replaced #162

Closed M4Al closed 6 months ago

M4Al commented 6 months ago

I have a normal profile with a specific schema mentioned 'silver'

fabric-mpl-test:
  target: fabric-mpl-test
  outputs:
    fabric-mpl-test:
      authentication: CLI
      database: DWH
      driver: ODBC Driver 18 for SQL Server
      host: <<EZMOVED>>
      schema: silver
      threads: 4
      type: fabric

In my model I add some config to write it away in another schema

{{ config( materialized="table", schema="gold" ) }}

The result is that a table is created silver_gold.dimFinancialCompanyName instead of the expected gold.dimFinancialCompanyName.

Not sure if this is an adapter issue of a core dbt feature though.

ThomsenS commented 6 months ago

this is how dbt handles custom schemas by default. see dbt docs https://docs.getdbt.com/docs/build/custom-schemas#how-does-dbt-generate-a-models-schema-name link also includes guidance on how to change the default behavior if needed.

M4Al commented 6 months ago

Thanks for the link. Must have missed it when researching this feature.

Excuses for the dummy issue.