Can I call a task from within another task? Is thi...
# prefect-community
s
Can I call a task from within another task? Is this allowed? Bad style? No problem at all? Any caveats? I suppose its problematic because this could take the A out of DAG…
i
Yes you can. But the task inside will not show up in the DAG. Is it bad style? Not sure.
also if it's a set of complex mapped tasks look at
apply_map
s
Naaa, its more of a "if A then do g(f()) else f()" situation. But i can rewrite it to work with return values and
case()
. Or maybe
apply_map()
, yes. Thanks.