title: Airflow: How to pass xcom from parent dag to subdag
body: <p>Considering a parent dag that pushes value to xcom, how to retrieve dag from subdag?</p>
  
  <p>What I've tried:</p>
  
  <pre><code>#parent_dag.py
  
  PARENT_DAG_NAME = "MyParentDag"
  CHILD_DAG_NAME = "MyChildDag"
  
  main_dag = DAG(
    dag_id=PARENT_DAG_NAME,
    schedule_interval="@hourly",
    start_date=DAG_START_DATE
  )
  
  
  def push_value(**kwargs):
      ''' push into Xcom '''
      return [1, 2]
  
  t1 = PythonOperator(task_id='push_value',
                         python_callable=push_value,
                         retries=3,
                         dag=main_dag)
  
  subdag_1 = SubDagOperator(
    subdag=Sub_Dag1(
        PARENT_DAG_NAME,
        CHILD_DAG_NAME,
        main_dag.start_date,
        main_dag.schedule_interval,
        "'{{ ti.xcom_pull(task_ids='push_value', dag_id='" + PARENT_DAG_NAME + "' }}'"
    ),
    task_id=CHILD_DAG_NAME,
    dag=main_dag,
  )
  t1 &gt;&gt; subdag_1
  </code></pre>
  
  <p>And the child subdag:</p>
  
  <pre><code>#subdag1.py
  
  
  def use_pushed_val(pushed_val, ds, **kwargs):
      log.info(pushed_val)
      return pushed_val
  
  def Sub_Dag1(parent_dag_name, child_dag_name, start_date, schedule_interval, pushed_val):
    dag = DAG(
      '%s.%s' % (parent_dag_name, child_dag_name),
      schedule_interval=schedule_interval,
      start_date=start_date,
    )
  
    childTask = PythonOperator(
        task_id='child_task',
        python_callable=use_pushed_val,
        op_kwargs = {'pushed_val' : pushed_val},
        provide_context=True,
        dag=dag
      )
  
  return dag
  </code></pre>
  
  <p>Instead of child subdag to log and return the <code>[1,2]</code>, it returned string <code>'{{ ti.xcom_pull(task_ids='push_value', dag_id='MyParentDag' }}'</code></p>