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

Safouane Chergui

11/16/2022, 3:37 PM
Hello, I’d like to know how does kedro process regex specified in globals_pattern. I’d like to do something like this below but the method below doesn’t work:
Copy code
TemplatedConfigLoader(
            conf_paths,
            globals_pattern="(globals*)|(another_parameters_file*)",
            globals_dict={"param1": "pandas.CSVDataSet"}
        )
How can I accomplish this ?
1
d

datajoely

11/16/2022, 3:50 PM
it’s not regex it’s glob pattern
😆 1
it accepts a string not a list so I’m not sure if you can do
"*globals.yml,conf/**/templates.yml"
so in general I don’t think it was designed for multiple files
this is also getting way easier to configure in 0.19.x
so the easy way to do it is something like
"conf/**/*globals.yml"
s

Safouane Chergui

11/16/2022, 3:52 PM
My brain read that as regex instead of glob even though it’s clearly written there, so biased 😅
d

datajoely

11/16/2022, 3:53 PM
and then having multiple files suffixed with
_globals.yml
and kedro will scoop them all up
1
👍 1
s

Safouane Chergui

11/16/2022, 3:53 PM
Thanks @datajoely 👍
K 1
3 Views