In airflow dag, how to default to ds within jinja templating. For example,
script_args = { '--previousRunDt': '{{ prev_execution_date_success |default(ds)}}' }'
Here when prev_execution_date_success is none, I need ds as default value. But it is evaluating to None
In Jinja, the
default()
filter will be used if the original value is not defined/missing.You could simply use an
or
statement here like: