Hi all, I opened an ADR on how we organize the example Dags and would love your thoughts: https://github.com/apache/airflow/pull/78116
This came out of a recent discussion about the Go SDK examples: the Go examples double as the e2e fixtures, and when we looked at improving them, we realized the bigger question is how the examples are organized in every language. The short version: today almost every example shows one feature (`example_branch_operator`, `example_short_circuit_operator`), so you have to know a feature's name before you can find it. In the 2024 and 2025 user surveys, "examples, how-to, documentation" was the top thing people wanted improved, and in 2025, 28% of the people who answered had used Airflow for less than a year. They know their problem, not which operator solves it. The ADR proposes: 1. Find an example by the problem it solves, e.g. "set bad records aside instead of failing the batch". The features it uses still go in its docs and tags. 2. Three levels: basics (one new concept each), scenarios (one team's whole job, built from the basics) and storylines (several teams chained through assets). 3. One list of problems for every language, told through the Tailwind wind park story we already agreed on in Examples Refurbish (https://cwiki.apache.org/confluence/display/AIRFLOW/Examples+Refurbish). Python goes first; the Go, TypeScript and Java SDKs follow as their features allow. 4. Examples are not test fixtures, so they can be improved without breaking a test. Each example would get a unit test and a smoke test that checks the outcome instead. The rollout is planned in small steps, each useful on its own, starting with splitting the Go examples from the e2e fixtures. There are a few open questions where I'd especially like input: - Who decides the shared Tailwind data, such as the record shape and asset names? - Where should the Python examples live? The ADR leans towards the standard provider's `example_dags`, so airflow-core doesn't grow. - What happens to the feature examples the list replaces, and do provider examples belong in the list? - Who looks after the list, and what happens when an SDK falls behind? Comments here or on the PR are very welcome. Thanks! Best regards, Benny Hsiao GitHub: ChickenBenny (https://github.com/ChickenBenny) --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
