Is there any way to access the kedro pipeline environment name? Actually below is my problem.
I am loading the config paths as below
conf_paths = ["conf/base", "conf/local"]
conf_loader = ConfigLoader(conf_paths)
parameters = conf_loader.get("parameters*", "parameters*/**")
catalog = conf_loader.get("catalog*")
But I have few environments like "conf/server"
, "conf/test"
etc, So if I have env name available I can add it to conf_paths as "conf/<env_name>"
so that kedro will read the files from the respective env folder.
But now if the env path is not added to conf_paths, the files are not being read by kedro even if i specify the env name while I run kedro like kedro run --env=server
I searched for all the docs but was not able to find any solution.
EDIT:
Elaborating more on the problem.
I am using the above-given parameters and catalog dicts in the nodes. I only have keys that are common for all runs in conf/base/parameters.yml
and the environment specific keys in conf/server/parameters.yml
but when i do kedro run --env=server
I am getting keyerror
which means the keys in conf/server/parameters.yml
is not available in the parameters dict. If I add conf/server
to config_paths kedro is running well without keyerror.