jack
02/19/2021, 4:52 PMnicholas
from prefect import Task
class DoSomething(Task):
def run():
# task logic
return
task_1 = DoSomething(name="task name")()
Samuel Hinton
02/19/2021, 4:58 PMJeremiah
task_args
when you call the function:
@task
def my_fn():
...
with Flow(...):
x = my_fn(..., task_args=dict(name="a custom name"))
y = my_fn(..., task_args=dict(name="another custom name"))
jack
02/19/2021, 5:57 PMSamuel Hinton
02/22/2021, 12:38 PMZanie
my_fn
task with a new static name. The docs you've linked to takes a single task and changes its runtime name based on a dynamic value. Perhaps it is worth noting this separate pattern in that same doc though.Samuel Hinton
02/22/2021, 4:31 PMBring 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.
Powered by