airflow-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ning Shi <n...@zoba.com>
Subject Subdag in Taskflow API
Date Fri, 02 Apr 2021 03:08:05 GMT
Hi,

The Taskflow API allows passing values between tasks simply by using
the return value of a task function as the parameter to another task
function. Is it possible to pass value from a subdag to a task
function? Please see the pseudo code below for what I am thinking
about.

@dag(...)
def parent_dag():
    @task()
    def post_process(var):
        pass

    subdag = SubDagOperator(
        task_id="my_subdag",
        subdag=create_subdag(...)
    )

    # Is this possible?
    post_process(subdag.output)


Thanks,

Ning

Mime
View raw message