Closed mateusz closed 2 months ago
Hey @mateusz
This issue seems to be caused by the postgres dbt adapter itself... 😞
Elementary uses the macro adapter.get_columns_in_relation
, to find metadata about the monitored column, and the adapter itself returns an empty list for materialized views.
I recommend opening an issue in the dbt-postgres repo for this issue.
Thanks for looking, will do.
Describe the bug
On postgres, when using
elementary.column_anomalies
test on a column that is part of a table using materialized views, an "Unable to find column" error occurs during the elemenatary data test run.To Reproduce
Create a table using materialized view materialization:
Configure test in DBT table spec:
Run elementary:
This problem goes away when I remove the materialization, or switch to
table
materialization.Expected behavior
I expect data tests to continue working when I switch to
materialized_view
materialization.Screenshots
n/a
Environment (please complete the following information):
prefecthq/prefect:2-python3.9