Hi, I am fairly new to Prefect and would like to o...
# best-practices
j
Hi, I am fairly new to Prefect and would like to orchestrate my current workflow but not sure where to start. At the moment I have a big python script that takes 2h to run locally. Basically scrapping, data analysis and writing in an DB (likely Airtable). My next step will be making different scripts to have sort of a pipeline. After that not sure if I should try to have the scripts running serverless with Google functions or AWS Lambdas, or go directly for containers. Any suggestions, no matter how basic, are very welcome :) Thank you!
1
a
The easiest would be to first split it into tasks and subflows, when needed, and then start building deployments. We have several resources on Discourse and GitHub for that, plus official docs.prefect.io and https://github.com/PrefectHQ/prefect-recipes. Best to start small (build deployments for small components running locally), then move to remote execution (e.g. infra and storage blocks) and let us know here if you get stuck along the way
j
Thank you Anna! With building deployments locally you mean having docker containers running locally?
a
not necessarily, you can build deployment with a (local) Process infrastructure block and local file system as your storage block and run deployments locally (still already connected to Cloud): e.g.
Copy code
prefect deployment build -n dev -q dev -a flows/hello.py:hello
for more information about those flags:
Copy code
prefect deployment build --help
then you can move on to remote storage and infrastructure block, check out: https://docs.prefect.io/concepts/infrastructure/?h=infras
👍 1