Hello Team, I’d like to know if I can change the d...
# questions
j
Hello Team, I’d like to know if I can change the data directory when I run Kedro. The current data catalog is like
Copy code
companies:
  type: pandas.CSVDataset
  filepath: ${data}/01_raw/companies.csv

reviews:
  type: pandas.CSVDataset
  filepath: ${data}/01_raw/reviews.csv
where
data
is defined in conf/base/globals.yml. Can I pass different
data
value at the run time?
j
Thank you @*datajoely!*
n
https://github.com/kedro-org/kedro/issues/3706 Should we prioritise this a bit? I have seen question about mix uses of global and runtime_params every week. Cc @Ankita Katiyar @Merel
💯 1
1000 1
1000000 1
👍 2
plusone 1
j
Hi @Nok Lam Chan, if I want
data
be a run-time parameter to change the filepath, where should I place it?
I changed the catalog as follows, but Kedro didn’t evaluate it correctly, and tried to read a file from its literal path
./{runtime_params:folder, '01_raw'}/reviews.csv
and failed. I’m using Kedro 0.18.14.
Copy code
companies:
  type: pandas.CSVDataset
  filepath: "${runtime_params:folder, '01_raw'}/companies.csv"

reviews:
  type: pandas.CSVDataset
  filepath: "${runtime_params:folder, '01_raw'}/reviews.csv"
Please disregard the above. It works fine with
OmegaConfigLoader
🚀 1
👍🏼 1