hello everyone, how do i flatten/join a task of tasks?
let’s say i already have tasks a,b,c defined but i would like to group them as a task, perhaps because i want a conditional flow: for one branch i want to execute a,b,c in order, otherwise i want to execute d,e,f
how do i go about this? without redefining a task which does what a,b,c/d,e,f already do?
e
emre
05/10/2021, 7:18 AM
The conditional task will skip
a
if the condition doesn't match. Skipping is propagated to downstream tasks, so skipping
a
skips
b
, which skips
c
. This means you can keep your tasks seperate, and still have a group of tasks execute conditionally.
emre
05/10/2021, 7:20 AM
Like this, maybe?
Copy code
with Flow("f") as f:
true_tasks = f(e(d()))
false_tasks = c(b(a()))
ifelse(cond(), true_tasks, false_tasks)
merge(true_tasks, false_tasks)
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.