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

Juan Diego

03/02/2023, 2:39 PM
Hi all! Just a quick one, is it possible to reference the CONF_SOURCE value in the templates?
data_folder: ${CONF_SOURCE}/data
This obviously doesn’t works, but you get the idea. Many thanks! ☺️
d

datajoely

03/02/2023, 2:41 PM
you can sort of do this, but i’d actually like to learn more about what you’re trying to do?
j

Juan Diego

03/02/2023, 2:57 PM
We have a structure with two elements: • The compiled Kedro project. • The conf folder deployed to an arbitrary location
[Errno 2] No such file or directory: '/Users/godoy/data/01_raw/ASF_202207.csv'
~ ❯ pwd
/Users/godoy
~ ❯ head -1 /tmp/tests/conf/base/globals.yml
data_folder: "data/
Resolving the final conf path from CONF_SOURCE (not the working one) will be much more convenient for us.
d

datajoely

03/02/2023, 2:59 PM
so in the latest version of 0.18.5 just released you can provide this on the CLI https://kedro-org.slack.com/archives/C03RKAQ0MGQ/p1676992416724269
j

Juan Diego

03/02/2023, 3:00 PM
yes, that’s what we are doing, ex:
kedro_cmd = f"--pipeline {pipeline} --conf-source {_conf_path_}"
we reach the conf folder, but any path used there is resolved from the launcher working path
d

datajoely

03/02/2023, 3:03 PM
Okay then you want that same path in a parameter or in a in catalog dataset path?
j

Juan Diego

03/02/2023, 3:06 PM
just to be able to access the value in the templates, BTW we can access this requirement using ENV vars, but I was wondering if there is a more direct way
d

datajoely

03/02/2023, 3:11 PM
so env vars are the lowest cost way of doing this
j

Juan Diego

03/02/2023, 3:13 PM
ok! many thanks and keep the amazing job!
K 1
🎉 1