[
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)