Optimize Your DAGs: Embrace Dag Params for Efficiency and Simplicity
summary
Argues that replacing ad hoc params with a structured JSON Schema–based Param class cuts duplicate DAG code, enforces types and range/length checks, and prevents wasted runs by rejecting bad inputs at trigger time; evaluates Pydantic and attrs then chooses JSON Schema for language-agnostic validators, easy serialization and backward compatibility with params dicts (rolled out around Airflow 2.x); shows concrete results: trigger UI now renders date pickers, dropdowns and inline validation, and API/CLI/serialization honor the same rules.
AI-written summary · about
chapters (10)
- 0:00Introduction and speaker background
- 1:06DAG params evolution and 2021 rework
- 3:51Problems with manual parameter validation
- 5:16Requirements for DAG params feature
- 8:06Evaluating Pydantic and ATTRs approaches
- 11:36Choosing JSON schema for DAG params
- 13:25DAG params launch and backward compatibility
- 15:53Trigger DAG UI improvements and contributors
- 17:19Modern DAG params features and UI enhancements
- 19:05Future possibilities and extensions
