You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Using the default update() method will override nested dictionary values instead of merging the two dictionary.
If we consider a new MergeBehavior or change MergeBehavior.Update behavior (instead of update(), possibly a deep merge), then this could help us address the requirements.
The text was updated successfully, but these errors were encountered:
Is this your first time submitting a feature request?
Describe the feature
Currently, the field
config.meta
will be directly updated according to the hierarchically order of where this field is specified.For example, at
dbt_project.yml
level, I have the definition:At the same time, at
schema.yml
level for the specific model, I have the definition:The merged config that I hope to be is:
But the actual config is the config at
schema.yml
level:Describe alternatives you've considered
Our use case is that:
config.meta
config.meta
with additional values depends on the modelWithout this approach, we will need to resolve to:
config.meta
values, which would result duplicating lines of configurations across modelsWho will this benefit?
For teams that manage large amount of models within a single dbt project, this enhancement will provide better management of configs.
Are you interested in contributing this feature?
Yes
Anything else?
I looked into this issue a little bit and it seems the behavior comes from here:
To be more specific, it is the default behavior of
python.dict.update()
that does not gracefully handle merge of nested dictionary:Using the default
update()
method will override nested dictionary values instead of merging the two dictionary.If we consider a new
MergeBehavior
or changeMergeBehavior.Update
behavior (instead ofupdate()
, possibly a deep merge), then this could help us address the requirements.The text was updated successfully, but these errors were encountered: