-
Notifications
You must be signed in to change notification settings - Fork 14.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add dag_id
and map_index
to the default template variables
#40958
Comments
|
|
dag_id
and map_index
as default variables to https://airflow.apache.org/docs/apache-airflow/stable/templates-ref.htmldag_id
and map_index
to the default template variables
There's currently an open PR (#41039) for solving #34158. When this PR is merged, will there still be a justification for the suggested feature? |
I wonder if we should try to add some more, and remove Or, maybe we should make those a proxy instead of the actual object, and remove things like |
Adding this to 3.0 since I think we need something to track the discussion. I’m not particularly in favour or disfavour to the exact solution proposed here. |
Description
Add
dag_id
andmap_index
as default variables to the template variables (accessible via task parameters).Use case/motivation
Generally useful and specifically easier access to these variables within operators that have serialization issues with the
dag_run
andti
objects, such as thePythonVirtualEnvOperator
.Related issues
get_current_context()
in a@task.virtualenv
task #34158Are you willing to submit a PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: