You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "Muthuraj Ramasamy (JIRA)" <ji...@apache.org> on 2017/03/28 01:22:41 UTC

[jira] [Updated] (AIRFLOW-1048) SubDagOperator to have xcom output based on its tasks

     [ https://issues.apache.org/jira/browse/AIRFLOW-1048?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Muthuraj Ramasamy updated AIRFLOW-1048:
---------------------------------------
    Priority: Major  (was: Minor)

> SubDagOperator to have xcom output based on its tasks
> -----------------------------------------------------
>
>                 Key: AIRFLOW-1048
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-1048
>             Project: Apache Airflow
>          Issue Type: New Feature
>          Components: subdag
>    Affects Versions: Airflow 2.0, Airflow 1.8
>            Reporter: Muthuraj Ramasamy
>
> Currently SubDagOperator doesn't support any xcom on its output. It would be better to specify SubDagOperator to read the xcom of one of the task (say task "end" and can be any Operator) and add to SubDagOperator output. Already tested the below in a local environment.
> #modified to handle xcom output for the sub dag in class SubDagOperator
>     def post_execute(self, context):
>         ret_value = context['task_instance'].xcom_pull(dag_id=self.subdag.dag_id, task_ids='end', key='return_value' )
>         context['task_instance'].xcom_push(key='return_value', value=ret_value) 
> I can make necessary changes and create a PR if this feature can be added.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)