dbt-msft / dbt-sqlserver

dbt adapter for SQL Server and Azure SQL
MIT License
212 stars 99 forks source link

dbt cache get_relations return None when database different from the one in profiles.yml #498

Closed G14rb closed 6 months ago

G14rb commented 6 months ago

I moved from 1.4.9 to the latest (1.7.13 dbt-core, 1.7.4 dbt-sqlserver) and I was able to run all the models in incremental materialization except the ones where I specified a database in dbt_project.yml different from the one in profiles.yml. Looking at the results from the logs it looks like when it tries to load_cached_relation it's not able to retrieve any relations from the cache.relations. I try to run it from a brand new docker container but still get the same result. Has anybody experience the same problem? Thanks

G14rb commented 6 months ago

Ok I found the root-cause, there's an error in dbt-fabric solved 2 days ago. The list_relations_without_caching is not considering the database at all. https://github.com/microsoft/dbt-fabric/commit/dc6f0182b804153a3a850d83e4fbf9ef98443dd2