Arnout Verboven
06/03/2025, 11:00 AMlocal
and prod
), is it possible to know during pipeline creation which environment is run? Or how should I do this using proper Kedro patterns. Eg. I want to do something like:
def create_pipeline(env: str = "local") -> Pipeline:
if env == "prod":
return create_pipeline_prod()
else:
return create_pipeline_local()
Ankita Katiyar
06/03/2025, 12:26 PMexport KEDRO_ENV=dev
And use the env variable in the create_pipeline()
to determine which pipelines should be created.Arnout Verboven
06/03/2025, 12:55 PMkedro run --env=dev
and does not get the same behavior. But I'll guess I'll do it this way 🙂Ankita Katiyar
06/03/2025, 1:25 PM--env
passed through the CLI does override the environment variable. It’s not ideal but dynamic pipelines are generally not supported by Kedro. Another thing I could think of was maybe passing params specified in the configuration environments which modify the behaviour of the node functions on that level but the pipeline structure itself remains the same.Juan Luis
06/07/2025, 3:35 PM