Skip to content

docs: fix misleading timetable variable example#61596

Open
Ratasa143 wants to merge 2 commits intoapache:mainfrom
Ratasa143:docs-fix-timetable-variable-example
Open

docs: fix misleading timetable variable example#61596
Ratasa143 wants to merge 2 commits intoapache:mainfrom
Ratasa143:docs-fix-timetable-variable-example

Conversation

@Ratasa143
Copy link
Contributor

What does this PR do?

This PR updates the best practices documentation to fix a confusing example in
the Timetables section.

The previous example accessed Airflow Variables inside a Timetable, which is
evaluated during DAG parsing. Doing this at parse time can lead to performance
issues or even cause the DAG processor to fail. The example has been updated to
avoid database access, and a note has been added to clarify the expected and safe
usage.

Why is this change needed?

The existing example no longer reflects current best practices and could
mislead users into writing unsafe DAG code.

Related issue

Fixes #61497

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Best Practice for using variable in timetable seems obsolet

1 participant