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:
.jinja2 extension is a widespread convention which is supported by various editors, including Github itself, PyCharm and VSCode.
- Putting templates inside
.jinja2 can help distinguish between regular files and template files just by looking at the directory contents
- Working with tools that recognize
.jinja2 templates can help reduce errors while authoring templates.
Related Issues
#8572 (comment)