https://kedro.org/ logo
#questions
Title
# questions
c

Chandan Malla

09/12/2023, 1:03 PM
Hey all, Is there any way to run the kedro pipeline from CLI without being inside the project path. Or change the project path itself?
d

datajoely

09/12/2023, 1:14 PM
Copy code
(cd SOME_PATH && kedro run)
Can you use a subshell?
c

Chandan Malla

09/12/2023, 1:16 PM
While this works, but does not achieve the objective , as it first goes to project directory and then runs kedro run
I have defined file path in catalog.yml from particular path let's say data: Filepath: API/kedro_model/data/01_raw_input/xyz.csv Absolute path would be D:/API/kedro_model/data/01_raw_input/xyz.csv Now I want to run kedro run from D:/API , and not from D:/API/kedro_model
d

datajoely

09/12/2023, 1:21 PM
can you not provide an absolute path in your catalog?
c

Chandan Malla

09/12/2023, 1:21 PM
Or if it is possiblle if i can programmatically change my catalog.yml filepath
So this is running in production and I am using kedrosession to run my pipelines, and kedrosession is defined outside of kedro project path.
d

datajoely

09/12/2023, 1:36 PM
so you can do this with templating
and switch out the templates based on the environment
you could for example do
/${_root_path}/API/...
, define this in
globals.yml
in two different
envs
https://docs.kedro.org/en/0.18.13/configuration/configuration_basics.html#how-to-change-the-default-overriding-environment
c

Chandan Malla

09/12/2023, 1:40 PM
Thanks, I have read about it, for the time being I am using kedrosession in a python file as a workaround to run the pipeline as a workaround
I didn't know about different envs, let me take a look on this also
Got the env part, this seems more simple. Thanks a lot 🙂🙂
d

datajoely

09/12/2023, 1:42 PM
👌
all of our principles of config stem from the 12factor app