Heyy guys! I'm trying to avoid doing some ugly, no...
# questions
Heyy guys! I'm trying to avoid doing some ugly, non kedronic solutions so perhaps You could help me with my problem. I would like for kedro to take in a command line arguments such as date or country and then do processing based on these arguments. So for example, I have a trained machine learning model, and a
pipeline can output predictions. Ideally, this predict pipeline can be run as
kedro run --pipeline=predict --date=2023-01-05
and this would ingest the dataset for 05th of Jan 2023 and run the prediction on it. I'm wondering how can I pass the CLI argument into the dataset catalog?
I think this could be achieved with
where you specify a template variable in your
and override the value via CLI. See an example here: https://kedro.readthedocs.io/en/stable/kedro.config.TemplatedConfigLoader.html
👍 1
Thanks a lot, I'll try it out 🙂
Ok, so I did manage to insert parameter from
into a query but I cannot override it using CLI, I'm trying to do it using
kedro run --pipeline=predict --params table:correct_name
when the
is a wrong name in the globals file. Is there another step which needs to be done to overwrite global variables?
I manged to partially do it using the VersionedDataset but it doesn't seem to be very clean, is there a perhaps better way to do it? It seems that versioned dataset forces a certain pattern in the file path which might be problematic for me
https://github.com/kedro-org/kedro/discussions/1782 Can you try this slight variation of TemplatesConfigaloader instead?
It works! Thanks a lot @Nok Lam Chan thankyou
😁 1