dondaum commented on issue #71586:
URL: https://github.com/apache/airflow/issues/71586#issuecomment-5677551003

   I assume this only occurs when the option to render fields as native Python 
objects is enabled, i.e. `render_template_as_native_obj=True` is set: 
   
https://airflow.apache.org/docs/apache-airflow/stable/core-concepts/operators.html#rendering-fields-as-native-python-objects
   
   In this case, Jinja always attempts to render the value as a native 
object—in this instance, as an integer. If this option is not enabled, the 
issue does not arise. There is a relevant section on this in the Airflow 
documentation.
   
   _NativeEnvironment renders values according to Python literal rules. This is 
useful when a template should produce a list, dict, number, or boolean, but it 
also means a string that looks like a number, such as "42", can be rendered as 
the integer 42. Keep the default string rendering, use a callable template 
field, or add explicit quoting if the task needs the value to stay a string._
   
   Using `map_index_template="'{{ ... }}'"` instead of `map_index_template="{{ 
... }}"` should resolve the 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