Ian Whalen
02/22/2023, 2:32 PMsettings.py
and looping over it in the jinja-esque style to define catalog entries.
Couldn’t immediately tell from the docs, though I haven’t had much time to work with the new loader. I am excited too of course 🙂Solomon Yu
02/22/2023, 3:59 PMIan Whalen
02/22/2023, 4:30 PMNok Lam Chan
02/23/2023, 5:47 AMMerel
02/23/2023, 10:58 AMIan Whalen
02/23/2023, 1:55 PMTemplatedConfigLoader
in settings.py
I would (want to) do:
fruit_list = ["apple", "banana", "pear"]
CONFIG_LOADER_CLASS = TemplatedConfigLoader
CONFIG_LOADER_ARGS = {
"globals_pattern": "*globals.yml",
"globals_dict": {"fruit": fruit_list},
}
and then in my catalog.yml
do:
{% for fruit in fruit_list %}
{{ fruit }}.raw_data:
type: pandas.CSVDataset
filepath: data/01_raw/{{ fruit }}.csv
{% endfor %}
Then as you can imagine I can also use my settings.fruit_list
elsewhere to generate modular pipelines.
This is what I wanted in the original thread I linked.
globals_dict
doesn’t work like that for TemplatedConfigLoader
. Unless something changed. I noticed a note about ac_context
in the release notes but didn’t see a change to the TemplatedConfigLoader
signature.