-
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
deprecate materialization overrides from imported packages #9971
Changes from 5 commits
9d78fb1
a2d1447
c47e094
018252e
27d1a37
14dbd00
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: Raise deprecation warning if installed package overrides built-in materialization | ||
time: 2024-04-18T17:25:28.37886-04:00 | ||
custom: | ||
Author: michelleark | ||
Issue: "9971" |
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -450,6 +450,16 @@ def message(self) -> str: | |
return line_wrap_message(description) | ||
|
||
|
||
class PackageMaterializationOverrideDeprecation(WarnLevel): | ||
def code(self) -> str: | ||
return "D016" | ||
|
||
def message(self) -> str: | ||
description = f"Installed package '{self.package_name}' is overriding the built-in materialization '{self.materialization_name}'. Overrides of built-in materializations from installed packages will be deprecated in future versions of dbt." | ||
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. TODO: link to docs on workaround before merging 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. Message looks good! I figure we can link to the docs for the behavior change flag, which will go here: https://docs.getdbt.com/reference/global-configs/legacy-behaviors#source_freshness_run_project_hooks |
||
|
||
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.
TIL
Locality
+Specificity
!