Bas Harenslak created AIRFLOW-3556:
--------------------------------------

             Summary: Add a "cross join" function for setting dependencies 
between two lists of tasks
                 Key: AIRFLOW-3556
                 URL: https://issues.apache.org/jira/browse/AIRFLOW-3556
             Project: Apache Airflow
          Issue Type: New Feature
            Reporter: Bas Harenslak


Similar to airflow.utils.helpers.chain(), it would be useful to have a helper 
function that sets downstream dependencies in a cross join fashion between two 
lists of tasks.

For example:
{code}
cross_downstream(from_tasks=[t1, t2, t3], to_tasks=[t4, t5, t6])

Sets dependencies:
    t1 --> t4
       \ /
    t2 -X> t5
       / \
    t3 --> t6

Equivalent to:
t1.set_downstream(t4)
t1.set_downstream(t5)
t1.set_downstream(t6)
t2.set_downstream(t4)
t2.set_downstream(t5)
t2.set_downstream(t6)
t3.set_downstream(t4)
t3.set_downstream(t5)
t3.set_downstream(t6){code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to