[ 
https://issues.apache.org/jira/browse/AIRFLOW-847?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15856326#comment-15856326
 ] 

Daniel Huang commented on AIRFLOW-847:
--------------------------------------

I ran into this last week. {{xcom_pull()}} by default pulls xcom values from 
the current DAG 
(https://github.com/apache/incubator-airflow/blob/master/airflow/models.py#L1668).
 So if you're pulling from the SubDAG and want xcom values from the parent DAG, 
you need to specify it in the {{dag_id}} param. For example, from a template:

{code}
{{ task_instance.xcom_pull(task_ids="do_thing", dag_id=dag.parent_dag.dag_id) }}
{code}

> Xcoms are not passed into SubDAG
> --------------------------------
>
>                 Key: AIRFLOW-847
>                 URL: https://issues.apache.org/jira/browse/AIRFLOW-847
>             Project: Apache Airflow
>          Issue Type: Bug
>          Components: subdag, xcom
>            Reporter: Robin B
>            Priority: Blocker
>
> It's not possible to do a xcom_pull within a subdag
> None of the following seems to be working:
> * As templated var in SubDagoperator
> * As var in SubDagoperator
> * From within Subdag-factory



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

Reply via email to