question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[AIP-31] Update DAG examples to use Functional DAG style

See original GitHub issue

Description

  • Update Airflow documentation to use functional style DAGs instead.
  • Update Airflow tutorials documentation
  • Update information about XCom and .output attribute

Use case / motivation

As discussed in https://github.com/apache/airflow/pull/8962#discussion_r442706891 we believe that functional DAG definition may be easier to onboard and easier to abstract underlying Airflow mechanisms.

Related Issues

Created from #8962

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Reactions:1
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

2reactions
eladkalcommented, Jun 28, 2021

@josh-fell assigned to you

1reaction
josh-fellcommented, Sep 17, 2021

What do you think about this? I feel it’s good:

from airflow.example_dags.libs.helper import print_stuff

@task
def start_task():
    print_stuff()

Well, I completely missed the obvious answer; it’s been a long day. Love it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[AIP-31] Update Airflow tutorial to use functional DAGs #9041
Description. Change Airflow tutorial (or create new tutorial) using the new functional layer. Use case / motivation.
Read more >
Airflow functional DAG definition - AIP-31 - YouTube
Gerard Casas SaezAirflow does not currently have an explicit way to declare messages passed between tasks in a DAG. XCom are available but ......
Read more >
Apache Airflow 2.0 is here!
A new way of writing dags: the TaskFlow API (AIP-31) · Fully specified REST API (AIP-32) · Massive Scheduler performance improvements · Scheduler ......
Read more >
DAG writing best practices in Apache Airflow
Keep up to date with the best practices for developing efficient, secure, and scalable DAGs using Airflow. Learn about DAG design and data...
Read more >
AIP-31: Airflow functional DAG definition
In addition, we will explore a new way to define custom Python transformations using the task decorator proposed, and how this change may...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found