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)
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, .jsonetc., so it means users need to write Jinja2 templates inside.sh,.jsonfiles. A better way to do it would be supporting the.jinja2extension.Use case / motivation
The motivation is threefold:
.jinja2extension is a widespread convention which is supported by various editors, including Github itself, PyCharm and VSCode..jinja2can help distinguish between regular files and template files just by looking at the directory contents.jinja2templates can help reduce errors while authoring templates.Related Issues
#8572 (comment)