Hi Benny,

thanks for the proposal. I had some time ago the same ambition to have better and cleane examples. Unfortunately I had a bike crash which was making me abent the last half year. The goals are still the same - similar as you write. I'd like to join the party! The document https://cwiki.apache.org/confluence/display/AIRFLOW/Examples+Refurbish was written some time ago, feel free to propose changes.

Jens

P.S.: few answers for you:

 * Who decides the shared Tailwind data, such as the record shape and
   asset names?
     o That is part of modelling the example, everything that is
       "meaningful" makes sense
 * Where should the Python examples live? The ADR leans towards the
   standard provider's `example_dags`, so airflow-core doesn't grow.
     o There is no decidion but my proposal is to clen-up the
       example_dags folder as this is pre-installed for most users.
 * What happens to the feature examples the list replaces, and
   do provider examples belong in the list?
     o Global examples in my view belong to the example_dags, very
       specific examples belonging only to one provider or area might
       be separated no to clutter the example_dags folder. Aim was
       always to implement a feature that examples can be added per
       provider and are dynamically loaded. There was an open PR but I
       think it was not merged yet.
 * Who looks after the list, and what happens when an SDK falls behind?
     o Good question. Examples in my view should be adjustedt whever a
       feature changes, if one SDK bringt a new feature the example
       should be in the release as well. But there was no decision yet.

On 04.12.26 11:04, Benny Hsiao wrote:
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]

Reply via email to