Benjamin Bonhomme
11/02/2021, 3:20 PMKevin Kho
StartFlowRuncreate_flow_runBenjamin Bonhomme
11/02/2021, 3:22 PMStartFlowRunBenjamin 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
StartFlowRunwait=Falsewait=TrueKevin 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
