admin管理员组文章数量:1318021
I wanted to use the warn_error_option or warn_error in dbt to selectively mark some warnings as errors.
Following the official documentation of dbt (), we can use something like this :
#dbt_project.yaml
name: "my_dbt_project"
flags:
warn_error_options:
error:
- NoNodesForSelectionCriteria
warn:
silence:
But when I try to run a model named test_model.sql that does not exist, instead of throwing error, it still gives me the following in the logs:
The selection criterion 'test_model' does not match any nodes
Nothing to do.Try checking your model configs and model specification args.
Can anyone suggest changes needed in the code ?Is warn_error or warn_error_option flag compatible with dbt core v1.4.8
I wanted to use the warn_error_option or warn_error in dbt to selectively mark some warnings as errors.
Following the official documentation of dbt (https://docs.getdbt/reference/global-configs/warnings), we can use something like this :
#dbt_project.yaml
name: "my_dbt_project"
flags:
warn_error_options:
error:
- NoNodesForSelectionCriteria
warn:
silence:
But when I try to run a model named test_model.sql that does not exist, instead of throwing error, it still gives me the following in the logs:
The selection criterion 'test_model' does not match any nodes
Nothing to do.Try checking your model configs and model specification args.
Can anyone suggest changes needed in the code ?Is warn_error or warn_error_option flag compatible with dbt core v1.4.8
Share Improve this question edited Jan 22 at 17:57 desertnaut 60.4k32 gold badges153 silver badges181 bronze badges asked Jan 22 at 16:24 Aaryan OhekarAaryan Ohekar 313 bronze badges1 Answer
Reset to default 0In dbt 1.4 the flags warn_error
and warn_error_options
are defined in profiles.yml
:
config:
warn_error: true
warn_error_options:
include: all
exclude:
- NoNodesForSelectionCriteria
Reference: https://github/dbt-labs/docs.getdbt/blob/1a9ca4d4594fbcf683d260afc83927262b5582a1/website/docs/reference/global-configs.md#warnings-as-errors
Note that the version 1.4 is no longer supported. See https://docs.getdbt/docs/dbt-versions/core
本文标签: Using warnerroroptions or warnerror in dbtcore 148Stack Overflow
版权声明:本文标题:Using warn_error_options or warn_error in dbt-core 1.4.8 - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742033917a2416972.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论