sirVir commented on issue #34394:
URL: https://github.com/apache/airflow/issues/34394#issuecomment-1722964009

   @Taragolis thank you for the clarification. So the getter with default value 
works only on the top level and it looks like it is currently not possible to 
use default/fallback variable values for missing variables for JSON content in 
Airflow?
   
   As if I am trying to do that to inject a dictionary:
   ` '''{{ var.json.get('somekey', "{ 'somecontent': False }" ).somecontent 
}}''' `
   
   I get `jinja2.exceptions.UndefinedError ` as the result when variable is 
missing.
   
   Do you know any way in which we could get default fallback values in case of 
missing JSON variables/missing keys in JSON dictionary?


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