airflow-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Edward Tomazic <EToma...@Scentregroup.com>
Subject XCom and Sub DAGs
Date Wed, 31 Jan 2018 08:05:15 GMT
Hi,
                Have a general question re the use of XCom between Sub DAGs.

I have the following DAG structure:

dag.task-1 (SubDagOperator)
    subdag1.task-1 (PythonOperator) >> subdag1.task-2 (SubDagOperator)
                                               subdag2.task-3 (BigQueryOperator) >>
subdag2.task-4 (BigQueryOperator)

subdag1.task-1 returns a value which is automatically pushed to XCom with a key of "return_value".
 I then try to pull the value from subdag2.task-3 with the following template:

{{ task_instance.xcom_pull(task_ids='task-1', key='return_value') }}

The template returns the value "None".

Can XCom be used to communicate between tasks of different DAGs?  And if so, what am I doing
wrong?

Kind regards,

Edward Tomazic

Data W/H Solution Architect

Scentre Group IT Data Management

________________________________

SCENTRE GROUP

T

+61 2 9358 7887

F

+61 2 9028 8500

M

+61 437 272 696

E

etomazic@scentregroup.com<mailto:etomazic@scentregroup.com>

FB

Scentre Group<https://www.facebook.com/#!/Westfield?fref=ts>

W

scentregroup.com<http://www.scentregroup.com>


[https://res.cloudinary.com/scentre-group-au/image/upload/v1510274486/email/logo.jpg]<http://www.scentregroup.com/>


This e-mail may contain information which is confidential, subject to legal privilege and
/or protected by copyright.  If you are not the intended recipient (or have received this
e-mail in error) please notify the sender immediately and destroy all copies of this email.
Mime
  • Unnamed multipart/related (inline, None, 0 bytes)
View raw message