Skip to content

Add dag_id and map_index to the default template variables #40958

@pedro-cf

Description

@pedro-cf

Description

Add dag_id and map_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 and ti objects, such as the PythonVirtualEnvOperator.

Related issues

Are you willing to submit a PR?

  • Yes I am willing to submit a PR!

Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions