Janick Spirig
08/28/2024, 3:02 PMgeneral.Basic:
asset_key: asset_id
Now I want to use value of asset_key
in other yaml file:
parameters/modules/capacity.yml
general.Basic:
capacity_key: ${basic:general.Basic.asset_key}
So I define in settings.py:
CONFIG_LOADER_ARGS = {
"config_patterns": {
"basic": ["**/basic.yml"],
"catalog": ["catalog*", "catalog*/**", "../catalog*", "../catalog*/**"],
"parameters": ["parameters*", "parameters*/**", "**/parameters*"],
"modules": [
"parameters/modules*",
"parameters/modules*/**",
],
"credentials": ["credentials*", "credentials*/**", "**/credentials*"],
"logging": ["logging*", "logging*/**", "**/logging*"],
},
}
However, I keep getting an interpolation error.
From the docs I have understood that this should be possible, using the approach described above.Nok Lam Chan
08/28/2024, 3:05 PM${basic:general.Basic.asset_key}
This is an incorrect keyNok Lam Chan
08/28/2024, 3:05 PM${general.Basic.asset_key}
if I understand correctly, or are you using a resolver that is called basic
that you haven't mentioned above?Nok Lam Chan
08/28/2024, 3:07 PMgeneral.Basic
, which I think you will run into this same issue. The PR is merged but we haven't done a release yet.
https://kedro-org.slack.com/archives/C03RKP2LW64/p1723193517960259
@Puneet SainiPuneet Saini
08/28/2024, 3:40 PMNok Lam Chan
08/28/2024, 4:04 PMNok Lam Chan
08/28/2024, 4:04 PMNok Lam Chan
08/28/2024, 4:41 PMNok Lam Chan
08/28/2024, 4:42 PMJanick Spirig
08/28/2024, 4:53 PMJanick Spirig
08/28/2024, 5:30 PM${general.Basic.asset_key}
is not working for me eitherNok Lam Chan
08/28/2024, 6:38 PMNok Lam Chan
08/28/2024, 6:40 PMJanick Spirig
08/28/2024, 6:42 PMgeneral.Basic.asset_key
as
"general": {
"Basic": {
"asset_key: {}
}
}
Janick Spirig
08/28/2024, 6:43 PMgeneral:
Basic:
Janick Spirig
08/28/2024, 7:10 PMgeneral.
piece so now root key just becomes Basic:
and works smoothly, thanks @Nok Lam Chan for the support!