Watch the recording
By proceeding you agree to our Privacy Policy, our Website Terms and to receive emails from Astronomer.
How to write better Airflow Dags
Recorded on
Marc LambertiHead of Customer EducationAstronomer
Kenten DanasDirector, Developer RelationsAstronomer
Tired of spending hours debugging failed Dags? Still writing top-level Dag code? You can avoid these common issues by using key Airflow features in your Dag code.
In this webinar, you’ll learn proven Dag writing best practices you can use right away to develop faster, reduce errors, and ship production-ready pipelines.
You’ll learn how to:
- Design Dags that are easy to read, test, and maintain
- Enable non-engineers to ship pipelines from YAML with Blueprint templates and Pydantic validation
- Apply Airflow 3 features like asset-aware scheduling, Dag versioning, and human-in-the-loop to make your pipelines reliable and observable
Frequently asked questions
What is the difference between dynamic Dag generation and dynamic task mapping?
Dynamic task mapping creates multiple task instances at runtime using .expand() based on a list of values. Dynamic Dag generation creates entirely different Dags at parse time. Use task mapping for multiple instances of the same task; use dynamic Dag generation sparingly. Learn more in the Dynamic tasks guide.
What changes in Airflow 3 with the addition of Dag bundles?
In Airflow 2, deploying an update to a Dag could lead to ongoing Dag runs with upstream tasks using old code, and downstream tasks using new code. In Airflow 3, when using a versioned Dag bundle, an in-flight run stays locked to its starting Dag version. You can safely deploy changes to Dags without breaking any Dag runs. See the Dags versioning and Dag bundles guide for details.