microsoft / dbt-fabric

MIT License
79 stars 28 forks source link

materialization_view_fabric macro is not able to find correct relation when re-running a dbt model #236

Open il-hanna opened 1 month ago

il-hanna commented 1 month ago

Description

I'm running into this case where:

Compilation Error in model stg__transaction_lines (models/staging/stg__transaction_lines.sql)
  When searching for a relation, dbt found an approximate match. Instead of guessing 
  which relation to use, dbt will move on. Please delete "DB_WG_BI"."dbt_staging"."stg__transaction_lines", or rename it to be less ambiguous.
  Searched for: "db_wg_bi"."dbt_staging"."stg__transaction_lines"
  Found: "DB_WG_BI"."dbt_staging"."stg__transaction_lines"

  > in macro materialization_table_fabric (macros/materializations/models/table/table.sql)
  > called by model stg__transaction_lines (models/staging/stg__transaction_lines.sql)

Image

Expected behavior

il-hanna commented 3 weeks ago

update, this is due to the quoting definition. A workaround has been switching back and forth between quoting config for database, schema, and identifier - when I use dbt run vs dbt packages.