ryanyuan commented on issue #4900: [AIRFLOW-3362] [WIP]Template to support 
jinja2 native python types
URL: https://github.com/apache/airflow/pull/4900#issuecomment-480145101
 
 
   @mik-laj Yes, in #4770, I used ast.literal_eval() to do the job, but on a 
local level. And I was suggested to do it, in #4848, on a global level using 
Jinja2's NativeEnvironment. 
   
   Now I am having a bottleneck, which is Jinja2 trying to get the templated 
field's value of date type.
   E.g. 
   Templated value is 2019-11-11. And Jinja2 sees it as subtraction and returns 
1997.
   
   So I am thinking to do ast.literal_eval() inside airflow.models' 
render_template() function. @ashb 

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


With regards,
Apache Git Services

Reply via email to