-
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
[state:modified] persist unrendered_config from schema.yml, and more reliably compute unrendered_config from .sql files #10487
Conversation
Thank you for your pull request! We could not find a changelog entry for this change. For details on how to document a change, see the contributing guide. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #10487 +/- ##
==========================================
+ Coverage 89.03% 89.09% +0.06%
==========================================
Files 182 182
Lines 23195 23288 +93
==========================================
+ Hits 20651 20748 +97
+ Misses 2544 2540 -4
Flags with carried forward coverage won't be shown. Click here to find out more.
|
…ct if unavailable
77edf79
to
bad6b92
Compare
Corresponding schemas PR: dbt-labs/schemas.getdbt.com#60 |
relation_name: Optional[str] = None | ||
raw_code: str = "" | ||
|
||
def __post_serialize__(self, dct: Dict, context: Optional[Dict] = None): | ||
dct = super().__post_serialize__(dct, context) | ||
if context and context.get("artifact") and "config_call_dict" in dct: | ||
del dct["config_call_dict"] | ||
if context and context.get("artifact") and "unrendered_config_call_dict" in dct: | ||
del dct["unrendered_config_call_dict"] |
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.
even though this isn't serialized, we still need a schemas.getdbt.com PR, similar to config_call_dict: dbt-labs/schemas.getdbt.com#60
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.
It would be really nice to spend some time making all the config application and merging code cleaner. Maybe next quarter...
Resolves #9564
Problem
A node's unrendered_config included rendered values, because the population of unrendered_config from models with config in .sql files was occurring after kwargs were evaluated by value (e.g. materialized=(jinja expression) => jinja expression evaluated by the time we are in ConfigProviders)
We were not storing the unrendered_configs from schema.yml parsing
Solution
All behind the new behaviour flag,
state_modified_compare_more_unrendered_values
patch_config_dict
Checklist