Aliza Rayman
11/20/2019, 8:54 AMA->B->C
to pull and preprocess data, then in between processing which varies by flow, then G-H-I
to aggregate/ handle the result. It seems like update
isn't the ideal use case for this.
Right now I just have tasks in separate modules and import and run them all (so its a bit messy)Zachary Hughes
11/20/2019, 3:58 PMAliza Rayman
11/20/2019, 4:01 PMZachary Hughes
11/20/2019, 4:24 PMReally each of the flows has totally different logic in the inside but are run similarly using object polymorphism.Okay, understood! So the pattern is similar, but the code itself might not be immediately reusable, if I'm understanding correctly. Regarding how much to parametrize: it's really an issue of personal preference. My general rule of thumb is to treat them like standard Python input variables: if you have one or two dictating logic, good. If you're using them to dictate wildly different logic paths, it might be better to decompose the function. As for organizing your tasks, it sounds like the best approach might be to organize them loosely into parent/child classes (PullTask, ProcessTask, etc.). Does the example in the linked documentation seem like it might be useful? https://docs.prefect.io/core/tutorials/task-guide.html#use-a-task-class-for-templating-tasks
Aliza Rayman
11/20/2019, 5:20 PM