Fix!: Exclude redundant keys from the config attribute in dbt models#1294
Merged
izeigerman merged 1 commit intomainfrom Aug 10, 2023
Merged
Fix!: Exclude redundant keys from the config attribute in dbt models#1294izeigerman merged 1 commit intomainfrom
izeigerman merged 1 commit intomainfrom
Conversation
tobymao
reviewed
Aug 10, 2023
| quote_identifiers=True, | ||
| ): | ||
| parsed_snapshot = json.loads(snapshot) | ||
| jinja_macros_global_objs = parsed_snapshot["node"]["jinja_macros"]["global_objs"] |
Contributor
There was a problem hiding this comment.
does this dict always exist?
tobymao
reviewed
Aug 10, 2023
| jinja_macros_global_objs["config"], dict | ||
| ): | ||
| for key in CONFIG_ATTRIBUTE_KEYS_TO_REMOVE: | ||
| jinja_macros_global_objs["config"].pop(key, None) |
Contributor
There was a problem hiding this comment.
is this migration necessary? won't it get cleaned up eventually on it's own
Contributor
Author
There was a problem hiding this comment.
yeah, but what's the point of keeping this dead baggage in the database? Plus I don't think we want to trigger a plan diff
Contributor
There was a problem hiding this comment.
would it trigger one? doesn't migrate rows handle it?
Contributor
Author
There was a problem hiding this comment.
Migrate rows reads from the same state, as opposed to a local state, so I don't see how it would help here.
tobymao
approved these changes
Aug 10, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Amount of data in the
configattribute of thesushi.customer_revenue_by_daymodel before the fix: 10KBAfter the fix: 1.5KB