Open wusanny opened 3 months ago
Thanks for reporting. There is currently a PR for improving column comment materialization, I will check with author if it addresses this issue.
Ok, #750 didn't fix this particular issue so we'll need to dig deeper into what changed. Thanks for reporting.
Describe the bug
An error message that used to show up in dbt v1.6 (when certain conditions are met), no longer shows up in dbt v1.7 and above.
In dbt v1.6, when
persist_docs
is enabled, models materialized as table and there are columns defined in the schema.yml file that are not present or have a different column name in the actual models built - the run will fail and an error message will show.The above error message is no longer present in dbt v1.7 and above.
Steps To Reproduce
Start with dbt v1.6
Add a model file:
select 1 as id
persist_docs
in dbt_project.yml and table materialization:dbt build -s foo
Expected behavior
Users expect to see the same error message being prompted in dbt version higher than 1.6 so as to made them aware that the columns defined in their schema.yml is inconsistent with what is present in their actual built models.
Screenshots and log output
The one WITH error:
The one WITHOUT error:
System information
dbt --version
: dbt Cloud - tested with dbt version 1.6 and 1.7The operating system you're using: macOS
The output of
python --version
:Additional context
It does not matter whether or not there are column descriptions in schema.yml - as long as
persist_docs
is enabled and the columns listed in schema.yml does not match the columns found in the built models, the error will show (dbt v1.6).However, if we change the materialization to view - error does not arise (even in dbt v1.6).