Hi everyone, how do I name these tasks so that visually they appear with proper names
``````
k
Kevin Kho
01/11/2022, 2:38 PM
You can do:
Copy code
with Flow("parent-flow", schedule=weekday_schedule) as flow:
# assumes you have registered the following flows in a project named "examples"
flow_a = create_flow_run(flow_name="A", project_name="examples", task_args=dict(name="some_name"))
Kevin Kho
01/11/2022, 2:39 PM
Could you move the code to the thread when you get the chance to keep the main channel a bit more compact?
p
Prudhvi Kalakota
01/11/2022, 2:40 PM
Copy code
from prefect import Flow
from prefect.schedules import CronSchedule
from prefect.tasks.prefect import create_flow_run, wait_for_flow_run
weekday_schedule = CronSchedule(
"30 9 * * 1-5", start_date=pendulum.now(tz="US/Eastern")
)
with Flow("parent-flow", schedule=weekday_schedule) as flow:
# assumes you have registered the following flows in a project named "examples"
flow_a = create_flow_run(flow_name="A", project_name="examples")
wait_for_flow_a = wait_for_flow_run(flow_a, raise_final_state=True)
flow_b = create_flow_run(flow_name="B", project_name="examples")
wait_for_flow_b = wait_for_flow_run(flow_b, raise_final_state=True)
flow_c = create_flow_run(flow_name="C", project_name="examples")
wait_for_flow_c = wait_for_flow_run(flow_c, raise_final_state=True)
flow_d = create_flow_run(flow_name="D", project_name="examples")
wait_for_flow_d = wait_for_flow_run(flow_d, raise_final_state=True)
flow_b.set_upstream(wait_for_flow_a)
flow_c.set_upstream(wait_for_flow_a)
flow_d.set_upstream(wait_for_flow_b)
flow_d.set_upstream(wait_for_flow_c)
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.