dbt-msft / dbt-sqlserver

dbt adapter for SQL Server and Azure SQL
MIT License
205 stars 96 forks source link

when dbt-run twice with config martialized table it does not overwrite the table #206

Closed ijdev closed 2 years ago

ijdev commented 2 years ago

Hi

I think I'm having an issue with dbt-sqlsever.

When I run dbt run the table gets created with no issue when I do dbt run again it breaks !

When ever I do dbt run for the second time I get a compilation error:

When searching for a relation, dbt found an approximate match. Instead of guessing
  which relation to use, dbt will move on. Please delete database.schema.table, or rename it to be less ambiguous.
  Searched for: database.database.database
  Found: database.schema.table

Using:


Windows 11 
python version 3.9.1
dbt version: 1.0.1
dbt-core
dbt-sqlserver

I've been at it for hours I can't why is this happening. Thanks.

ijdev commented 2 years ago

Database name in the profiles file must match (per letter) the db name in the database server. I had the database name: database but it was called dataBase.