wiretrack
12/24/2020, 8:19 PMDylan
Dylan
wiretrack
12/24/2020, 8:22 PMDylan
Dylan
wiretrack
12/24/2020, 8:23 PMwith Flow('parent-flow') as flow
setting the upstreamswiretrack
12/24/2020, 8:24 PMcustomer_flow = Flow('customer_flow')
?Dylan
Dylan
Dylan
Dylan
wiretrack
12/24/2020, 8:28 PMdependencies
in the context of the imperative api maybe they are required?wiretrack
12/24/2020, 8:28 PMwiretrack
12/24/2020, 8:32 PMfrom prefect import Task, Flow
# The tasks
class RunMeFirst(Task):
def run(self):
print("I'm running first!")
class PlusOneTask(Task):
def run(self, x):
return x + 1
# Instanciates the Flow
flow = Flow('My Imperative Flow')
# The task instance (I'm using the decorator format), this is where I get the error
plus_one = PlusOneTask()
# I don't have that.
flow.set_dependencies(
task=plus_one,
upstream_tasks=[RunMeFirst()],
keyword_tasks=dict(x=10))
flow.visualize()
Dylan
Dylan
Dylan
Dylan
Dylan
with Flow("my flow") as flow:
result = my_task()
with case(result, True):
#do something
wiretrack
12/24/2020, 8:47 PMDylan
wiretrack
12/24/2020, 8:49 PMDylan
wiretrack
12/24/2020, 8:59 PMwiretrack
12/24/2020, 9:00 PMDylan
wiretrack
12/24/2020, 9:01 PMDylan
wiretrack
12/24/2020, 9:02 PM