Skip to content

Consider supporting .jinja2 extensions across the project #8603

@oripwk

Description

@oripwk

Description

At the moment, various operators support reading templates from given filenames (for example, bash_command of BashOperator). However, all of these operators specify extensions such as .sh, .json etc., so it means users need to write Jinja2 templates inside .sh, .json files. A better way to do it would be supporting the .jinja2 extension.

Use case / motivation

The motivation is threefold:

  1. .jinja2 extension is a widespread convention which is supported by various editors, including Github itself, PyCharm and VSCode.
  2. Putting templates inside .jinja2 can help distinguish between regular files and template files just by looking at the directory contents
  3. Working with tools that recognize .jinja2 templates can help reduce errors while authoring templates.

Related Issues

#8572 (comment)

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions