-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CT-3067] [Bug] Docs blocks don't work in model versions #8540
Labels
Comments
github-actions
bot
changed the title
[Bug] Docs blocks don't work in model versions
[CT-3067] [Bug] Docs blocks don't work in model versions
Sep 1, 2023
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 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 |
2 tasks
From estimation:
|
5 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
The text was updated successfully, but these errors were encountered: