AkashB
08/22/2019, 6:04 AMJeremiah
AkashB
08/23/2019, 5:02 AMJeremiah
AkashB
08/23/2019, 5:17 AMJeremiah
ifelse
and map
that can help you take different paths through the workflow or generate dynamic tasks.ifelse
in an imperative flow — we should document this in a FAQ. Because functions like ifelse
generate intermediate tasks, I’d actually recommend switching to the functional API just for that one call. Something like:
# ... imperative flow building
flow.add_task(condition)
# switch to functional for ifelse
with flow:
result = ifelse(condition, <true>, <false>)
# back to imperative
flow.add_task(...)
you could introspect ifelse, rebuild it yourself, and capture all the intermediate tasks, but this will accomplish the same thing. You can switch between functional and imperative APIs at any time.flow
argument to ifelse
so it could be used in the imperative API without modification. (cc @Chris White for opinion?)Chris White
AkashB
08/26/2019, 4:09 AMtask.run()
. But when using add_task
, it's giving me error. I even tried task.set_upstream
. It's also giving the same error.Chris White
AkashB
08/27/2019, 4:06 AMChris White
AkashB
08/27/2019, 11:22 AM