Galen Seilis
09/06/2024, 4:14 PM*ValueError*: Duplicate keys found in path\to\conf\dev\catalog.yml and path\to\conf\base\catalog.yml: foo_dataset, bar_dataset, baz_dataset
Here is how I am trying to load the base catalog:
import os
from pathlib import Path
from kedro.config import OmegaConfigLoader
from <http://kedro.io|kedro.io> import DataCatalog
os.chdir(Path(__file__).parent.parent)
conf_loader = OmegaConfigLoader(conf_source="conf", env='base')
conf_catalog = conf_loader.get("catalog")
catalog = DataCatalog.from_config(conf_catalog)
I can see the error is a result of duplicate dataset names in the configurations. For the dev environment these are the same datasets but saved to a CSV, whereas base I am writing the data to a database.
Is it idiomatic Kedro to just rename these? Or is there a feature I am missing for how to load only one and not the other?Jitendra Gundaniya
09/06/2024, 5:34 PMNok Lam Chan
09/07/2024, 12:51 AMenv=base
, but there is also a default_run_env=""
, that is why you have the duplicate key I believe. We fixed this recently I think, but I am not sure if it has make to the release yet.Nok Lam Chan
09/07/2024, 12:52 AMdefault_run_env=local
(which is the settings when you have a kedro project) or default_run_env=base
, both should work