Open bdewilde opened 5 months ago
Thank you so much for providing such an easy, reproducible example! We will take a look at this
Hi @amychen1776 , just making sure I'm following: The decision was not to support this functionality, but to document that it isn't supported?
@bdewilde For the short term, we are going to document this limitation. But we do want to tackle this support and the core team is going to look into scoping this out.
Is this a new bug?
Current Behavior
As of dbt v1.8.1, if a model depends upon another model for which
materialized="materialized_view"
, any unit tests on the former model fail with a compilation error:Not able to get columns for unit test X from relation Y because the relation doesn't exist
. If the referenced model is materialized as a table, no error is raised; if the model being tested is a materialized view (and the reference model is a table), no error is raised.Expected Behavior
I would expect unit tests to function regardless of referenced model's materialization. I don't see this listed as a limitation here.
Steps To Reproduce
file:
model1.sql
file:
model2.sql
file:
_unit_tests.yml
$ dbt-postgres test --select test_matview
Relevant log output
Environment
Additional Context
No response