DAG can't return a list of results from tasks
yaronmat opened this issue · comments
yaronmat commented
when inside a DAG and trying to return a list of task results:
x=[task_a() for _ in list(range(10))]
return x
the next error is shown:
TypeError: This DAG returned a value of type [list].DAG's may only return a result of a nested DAG or Task
The problem (and current solution) is transforming this "list" to a real list object.
Current solution is to use a dummy task that gets x as a parameter and then just returns it (with no changes)
Meori Lehr commented
@thegreymatter didn't we close this lately? 🤔