Hi Everyone, I'm looking at switching to Prefect, ...
# ask-community
d
Hi Everyone, I'm looking at switching to Prefect, but I have a question: I currently have a scheduling system that is organized by different "jobs". These jobs are essentially python classes that can be instantiated with varying parameters. For example, I have a job class that moves files from an SFTP to a local directory and I create multiple instances of it through the UI and specify the parameters through the UI as well without creating additional code. Is it possible to do something similar with Prefect? Part of the advantage of the above system is that I can have non-technical people add jobs without adding any code or doing a release. Perhaps I'm not thinking about Prefect's tasks and flows correctly, but any hep or clarity would be appreciated.
k
Hi @DK! The answer to everything is Yes Prefect can handle this. First, Prefect wraps about Python to make tasks. It would just be a matter of tweaking your Python classes to the Prefect Task. Parameters is something that Prefect supports. You can set them for an “on-demand” run by editing the values in the UI
So people can do into the UI can choose the parameters for a given run and start the run
d
HI Kevin, thanks for the reply. I think I may not have been clear (or I'm misunderstanding). I see that Prefect can handle parameters and can run "on-demand" which is great a definitely a piece that I would need. However, in my current system, I can schedule and run all of the jobs independently even though they use the same underlying code because they are stored with the various parameters. So I can add new ones "on-demand" without overwriting the parameters in another flow. From what I can gather, with Prefect, I would have to create and register a new flow for each "job" even though they are essentially the same.
k
You can have different sets of Parameters for the same Flow. Parameters are attached to Schedules so it would be a matter of creating different Schedules with different Parameter configurations.
Having one flow but configured multiple ways for running on demand is indeed harder in Prefect as you would need to register them as separate flows.
d
Got it, being able to set the parameters on the schedule is helpful, but probably wouldn't work for my purposes.
Thanks for your help!
👍 1
k
I’ll write this down as feedback for the team since it’s the second time I’ve seen this asked for
d
that would be awesome! Having a drop down where you could select from flows that are already registered and then specify various parameters and schedule would be huge for my team.
👍 1