mightydeveloper opened a new issue #16892:
URL: https://github.com/apache/airflow/issues/16892


   When rendering jinja template, it is rendered recursively for some kind of 
collection type. (list, tuple, set, ...)
   However, for the dictionary type, only the `value` part is rendered while 
the `key` part is not rendered.
   
   I am wondering if this behavior is intended due to some unwanted behavior.
   If not, I want to suggest to render the keys as well during the rendering.
   
   **Use case / motivation**
   In my use case, both keys and values have to dynamically change.
   When rendering the following dictionary object, (with `template_key = 
"some_key"` and `template_value = "some_value"`)
   ```
   {'{{ template_key }}': '{{ template_value }}'}
   ```
   Currently, the behavior is 
   ```
   {'{{ template_key }}': 'some_value'}
   ```
   However, I would like to have
   ```
   {'some_key': 'some_value'}
   ```
   
   **Are you willing to submit a PR?**
   
   Yes, I would like to contribute!
   
   I believe the following line has to be modified.
   
https://github.com/apache/airflow/blob/2b10680a2f5188400459089713876c1ce49f1caf/airflow/models/baseoperator.py#L1068
   
   **Related Issues**
   
   I am not aware of other related issue.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

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


Reply via email to