DBT是否可以将配置添加到单个模型中的所有测试中
我希望一个模型中的所有测试仅测试最新数据。我可以在整个项目或这样的文件夹中应用一个条款:
tests:
my_project:
marts:
finance:
+where: "date_column = current_date"
但是,如果我确实更深入地将其置于模型上:
tests:
my_project:
marts:
finance:
fct_revenue_events:
+where: "date_column = current_date"
我会收到警告,并且似乎不起作用:
[WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- tests.my_project.marts.finance.fct_revenue_events
我该如何应用我的仅在一个模型中的所有测试中的子句?
I want all tests within one model to only test recent data. I can apply a where clause to the whole project or to a folder like so:
tests:
my_project:
marts:
finance:
+where: "date_column = current_date"
But if I do go one level deeper and put it on a model:
tests:
my_project:
marts:
finance:
fct_revenue_events:
+where: "date_column = current_date"
I get an warning and it doesn't seem to work:
[WARNING]: Configuration paths exist in your dbt_project.yml file which do not apply to any resources.
There are 1 unused configuration paths:
- tests.my_project.marts.finance.fct_revenue_events
How can I apply my where clause to all tests within one model only?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论