-
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
Adding descriptions to tests no longer possible with 0.20.0 #3599
Comments
Thanks for opening @mirosval. As you note, this wasn't officially supported documented in previous versions of dbt. At the same time, it did sort-of work, and I totally get why it's desirable. The In the meantime, I think a more general approach that could get you what you're after would be I'm going to close this issue in favor of the |
## Summary & Motivation According to the problem [Adding descriptions to tests is no longer possible from 0.20.0](dbt-labs/dbt-core#3599 ) and the source code [SchemaGenericTestParser](https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/parser/schema_generic_tests.py#L39) the general test does not support the description in the schema. This fix allows users to define a test description in `tests/<generic test>/config/meta/description`, to display data in Dagster(UI) Asset Check. ```yaml models: - name: wildberries_incomes tests: - name: 'Equal_row_count_with_stg__wildberries_incomes' config: meta: description: "Equal rows before join with mapping table" test_name: equal_rowcount compare_model: source('production', 'stg__wildberries_incomes') compare_model_final: True ``` Related: dbt-labs/dbt-core#2578 ![Снимок экрана 2024-01-29 в 14 57 45](https://github.com/dagster-io/dagster/assets/34104577/2638a04c-935f-4368-b21b-04c5de740614) ## How I Tested These Changes pytest Co-authored-by: Rex Ledesma <rex@dagsterlabs.com>
## Summary & Motivation According to the problem [Adding descriptions to tests is no longer possible from 0.20.0](dbt-labs/dbt-core#3599 ) and the source code [SchemaGenericTestParser](https://github.com/dbt-labs/dbt-core/blob/main/core/dbt/parser/schema_generic_tests.py#L39) the general test does not support the description in the schema. This fix allows users to define a test description in `tests/<generic test>/config/meta/description`, to display data in Dagster(UI) Asset Check. ```yaml models: - name: wildberries_incomes tests: - name: 'Equal_row_count_with_stg__wildberries_incomes' config: meta: description: "Equal rows before join with mapping table" test_name: equal_rowcount compare_model: source('production', 'stg__wildberries_incomes') compare_model_final: True ``` Related: dbt-labs/dbt-core#2578 ![Снимок экрана 2024-01-29 в 14 57 45](https://github.com/dagster-io/dagster/assets/34104577/2638a04c-935f-4368-b21b-04c5de740614) ## How I Tested These Changes pytest Co-authored-by: Rex Ledesma <rex@dagsterlabs.com>
Describe the bug
In 0.19 the following would work (in a Model or Source):
In 0.20 I get:
Steps To Reproduce
Add
description: aaa
under a test in a model or source.Expected behavior
No compilation error
System information
Which database are you using dbt with?
The output of
dbt --version
:The operating system you're using: macOS 11.4
The output of
python --version
: 3.9.5Additional context
I have not found a mention of this in the release notes and to be fair the updated docs don't say this should be possible. But it did work before and I think its useful especially when you want to document why you downgraded a test to a warning instead of an error.
The text was updated successfully, but these errors were encountered: