Hey all, new to prefect ^_^
I’m trying to make use of the github block - does anyone know where i can find documentation on this?
(more specifically, how i can go from the block being set up in the UI to referencing this within a task)
✅ 1
j
Jeff Hale
08/31/2022, 11:42 AM
In Prefect 2.3 you can reference the GitHub block in a Prefect Deployment or when making a deployment from the CLI.
I don’t believe you can use it in a task. What are you trying to use it for?
Anna just released this blog post yesterday that shows how to create the GitHub read-only storage block in code and then reference from the command line when creating a Deployment.
a
Abimbola Adebayo
08/31/2022, 11:46 AM
ohh i see
my goal was:
• read from our dbt repository
• run commands based on these files
so i should do this in the deployment file, then assume the files are available in the task & flows?
👍 1
@Jeff Hale a follow up question
what’s the best way to get the exact path for where this repo is cloned to?
so i can reference a specific file using a path within a task or flow? (if that’s possible)
thank you for your previous help!
j
Jeff Hale
08/31/2022, 9:22 PM
That’s a good question. I don’t know that you can grab that path. I believe it’s temporary.
If you want to reference a file, you can upload it to GitHub and reference it with a relative link in your flow code.
If you want to write out an artifact use an absolute path on your local machine or something like prefect-aws’s uploading functionality to send the artifact to an AWS Bucket.