Benjamin Bonhomme
11/02/2021, 3:20 PMKevin Kho
StartFlowRun
task or create_flow_run
?Benjamin Bonhomme
11/02/2021, 3:22 PMStartFlowRun
.Benjamin Bonhomme
11/02/2021, 3:25 PMAnna Geller
from prefect import Flow
from prefect.executors import LocalDaskExecutor
from prefect.tasks.prefect import StartFlowRun
start_flow_run = StartFlowRun(project_name="PROJECT_NAME", wait=True)
with Flow("extract_load_parallel", executor=LocalDaskExecutor()) as flow:
mapped_flows = start_flow_run.map(
flow_name=["d", "u", "b", "e", "c"],
)
Kevin Kho
StartFlowRun
does have wait=False
so it should just start it and then not worry about the result. Do you have wait=True
?Kevin Kho
Anna Geller
from prefect import Flow
from prefect.executors import LocalDaskExecutor
from prefect.tasks.prefect import StartFlowRun
start_flow_run = StartFlowRun(project_name="PROJECT_NAME", wait=True)
with Flow("extract_load_parallel", executor=LocalDaskExecutor()) as flow:
mapped_flows = start_flow_run.map(flow_name=["d", "u", "b", "e", "c"],)
mapped_flows_layer_2 = start_flow_run.map(flow_name=["s", "j"],)
mapped_flows_layer_2.set_upstream(mapped_flows)
flow.visualize()
Benjamin Bonhomme
11/02/2021, 3:44 PMAnna Geller
it is beside my comprehensionYou can really think of it as using normal multithreading and multiprocessing in Python - that’s what this executor is doing under the hood. LMK if you have any more questions about it
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.
Powered by