Josh Paulin
07/13/2022, 3:55 PMwith case(cond, True):
val1_if_true = action1_if_true()
val2_if_true = action2_if_true()
with case(cond, False):
val_if_false = action_if_false()
What (if anything) do I pass to the merge function?Anna Geller
07/13/2022, 6:16 PMfrom random import random
from prefect import task, Flow, case
from prefect.tasks.control_flow import merge
...
with Flow("conditional-branches-with-merge") as flow:
cond = check_condition()
with case(cond, True):
val1 = action_if_true()
with case(cond, False):
val2 = action_if_false()
val = merge(val1, val2)
another_action(val)
val2_if_true = action2_if_true()
? this should be after mergeJosh Paulin
07/13/2022, 6:19 PMAnna Geller
07/13/2022, 6:20 PM