Closed Gonzalo933 closed 11 months ago
Thanks @Gonzalo933! I was able to reproduce using the example you've provided, and I agree that the intended behavior is to support docs blocks for column-level descriptions at all levels.
Basically, while docs blocks are supported in the description
field specified for columns at the top level, it isn't supported when specified for columns
on a specific version:
models:
- name: versioned_model
description: '{{ doc("any_doc_block") }}' # this works
columns:
- name: id
description: '{{ doc("any_doc_block") }}' # this works
versions:
- v: 1
columns:
- name: id
description: '{{ doc("any_doc_block") }}' # this does NOT work
Very similar to:
Next step: @aranke to check if fix for #8509 fixes this issue as well.
From estimation:
Is this a new bug in dbt-core?
Current Behavior
Currently,
.yml
with model definitions do not support using doc blocks inside the fields.I believe this could be similar to #2913
Commenting or removing the doc block removes the error.
Expected Behavior
I would expect the doc to be loaded as a string.
Steps To Reproduce
with this model configuration:
DBT cloud Raises an error when trying to run the tests for the model.
Also, running
dbt docs generate
creates the right documentation forworking_model
and an empty string for the columncolumn_id
in the modelerror_model
Relevant log output
No response
Environment
Which database adapter are you using with dbt?
snowflake
Additional Context
No response