https://prefect.io logo
Title
b

Ben Fisher

04/27/2022, 4:56 PM
Hi All. Quick question on how to create a Flow that references external files. In my case, I’m going to run a set of perhaps a dozen queries against a database, and I obviously don’t want to embed the SQL. I’d like to store the SQL external in files. Is that something I can do?
k

Kevin Kho

04/27/2022, 5:00 PM
Yes as long as the flow has access to the files. Where are the files stored?
b

Ben Fisher

04/27/2022, 5:01 PM
What are my options? I could simply keep them on the agent server and reference them by path, right? I’m sure there are reasonable ways around parameterizing the directory location.
Could I also store them in GitHub?
k

Kevin Kho

04/27/2022, 5:05 PM
Check this if they are stored alongside the Flow in Git
b

Ben Fisher

04/27/2022, 5:07 PM
This is exactly what I was looking for. The pattern looks like it’ll work for most storage systems.
k

Kevin Kho

04/27/2022, 5:08 PM
If you are using
Local
agent, you can also use
LocalRun
with a specified working directory like the third example here