oripwk opened a new issue #8603:
URL: https://github.com/apache/airflow/issues/8603


   <!--
   
   Welcome to Apache Airflow!  For a smooth issue process, try to answer the 
following questions.
   Don't worry if they're not all applicable; just try to include what you can 
:-)
   
   If you need to include code snippets or logs, please put them in fenced code
   blocks.  If they're super-long, please use the details tag like
   <details><summary>super-long log</summary> lots of stuff </details>
   
   Please delete these comment blocks before submitting the issue.
   
   -->
   
   **Description**
   
   <!-- A short description of your feature -->
   At the moment, various operators support reading templates from given 
filenames (for example, 
[bash_command](https://airflow.apache.org/docs/stable/_api/airflow/operators/bash_operator/index.html#airflow.operators.bash_operator.BashOperator)
 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](https://marketplace.visualstudio.com/items?itemName=samuelcolvin.jinjahtml).
   1. Putting templates inside `.jinja2` can help distinguish between regular 
files and template files just by looking at the directory contents
   1. Working with tools that recognize `.jinja2` templates can help reduce 
errors while authoring templates.
   
   <!-- What do you want to happen?
   
   Rather than telling us how you might implement this solution, try to take a
   step back and describe what you are trying to achieve.
   
   -->
   
   **Related Issues**
   
   <!-- Is there currently another issue associated with this? -->
   https://github.com/apache/airflow/pull/8572#discussion_r416473395


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to