-
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
Behavior change cumulative type param #10909
Changes from 3 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
kind: Under the Hood | ||
body: Behavior change for cumulative metric type param | ||
time: 2024-10-31T09:46:09.757879-05:00 | ||
custom: | ||
Author: DevonFulcher | ||
Issue: "10960" |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -476,6 +476,16 @@ def message(self) -> str: | |
return line_wrap_message(warning_tag(description)) | ||
|
||
|
||
class MFCumulativeTypeParamsDeprecation(WarnLevel): | ||
def code(self) -> str: | ||
return "D019" | ||
|
||
def message(self) -> str: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Would it be easy to add the names of the outdated metrics in this message? Otherwise it might be hard for users to find. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ya, I don't think that is a straightforward change, given that it would change the interface. I think that could be an enhancement in the future. |
||
description = "Cumulative fields `type_params.window` and `type_params.grain_to_date` have been moved and will soon be deprecated. Please nest those values under `type_params.cumulative_type_params.window` and `type_params.cumulative_type_params.grain_to_date`. See documentation on behavior changes: https://docs.getdbt.com/reference/global-configs/behavior-changes." | ||
|
||
return line_wrap_message(warning_tag(description)) | ||
|
||
|
||
# ======================================================= | ||
# I - Project parsing | ||
# ======================================================= | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we update this to be just one error that lists all the metrics with deprecated fields? We previously had complaints from customers about this because it was extremely noisy to have a warning for each metric.