Open
Description
openedon Oct 21, 2024
Description
I'm running into this case where:
- a model was first materialized as view
- then changed to materialized as table
- then when I try
dbt run
that model again (with existing materialization type still = table) dbt returns this error
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)
Expected behavior
- earlier I was running this model alright without dbt throwing a weird notice around schema upper/lower case. But based on the error here seems like
dbt-fabric
materialization macro is searching for a lower cased schema (while it should have respected the casing of the original schema), drop that object, then rebuild.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Metadata
Assignees
Labels
No labels