Oleksii Malyshev
10/27/2023, 11:04 AMglobals.yml keys are used in my .yml parameters config files for the catalog. So when I change globals I change a catalog config. And I need to have the ability to change the globals.yml through extra_parameters or another way in code and also using CLI. I had such an ability using TemplateConfigLoader, but now I’ve switched to the OmegaConfigLoader to be up-to-date, but lost this functionality.
I found out that I can do this through runtime_parameters since v0.18.14. Is it the proper way to do it or it’ll not work and I need something else?Ankita Katiyar
10/27/2023, 11:21 AMglobals.yml with runtime_params: resolver but what you can do is in your catalog.yml -
dataset_name:
field_to_override: "${runtime_params:key, ${globals:global_key}}"
This will use value from --params: key=value otherwise use the globals value from globals.yml as defaultOleksii Malyshev
10/27/2023, 11:49 AMruntime_params values in the code?Ankita Katiyar
10/27/2023, 11:55 AMOleksii Malyshev
10/27/2023, 12:02 PMdataset_name key in configs that I want to change from CLI or using Python code, in both ways. First way via CLI you already described, thanks for that, now I'm interested in the second way. I mean that can I run Kedro session and manually set this dataset_name key via code?Ankita Katiyar
10/27/2023, 12:11 PMKedroSession.create(extra_params={"dataset_name":<new_name>}) the extra_params will be used by the runtime_params: resolver