Hey guys, just a general best practice question, I'm still very early in my learning journey with Prefect. What I'm seeing in the documentation is largely tasks as functions. And in the case of passing data between tasks, that's usually done by assigning a variable the value of the output of a task, and then passing that variable as an argument to another task. What's the guidance on doing this in an object-oriented way? Can tasks be methods? and then the methods can simply access values through
self
?
k
Kevin Kho
01/07/2022, 5:42 PM
I think you run into problems when you do it that way because
@task
returns a class, not a function. So you end up with nested classes
Bring your towel and join one of the fastest growing data communities. Welcome to our second-generation open source orchestration platform, a completely rethought approach to dataflow automation.