Context: https://github.com/apache/airflow/issues/26016
<https://github.com/apache/airflow/issues/26016>
Currently if a value is passed to a downstream via XComArg, e.g.
@task
def get_templated_echo():
return 'echo "The date is {{ ds }}"'
BashOperator(task_id="echo_task", bash_command=get_templated_echo())
Then this value does not go through Jinja2 templating, i.e. the BashOperator
above would print The date is {{ ds }} instead of The date is 2022-08-29. The
question here is, is this a conscious design decision, and is there reasoning
behind it? Personally I can see arguments from both sides, but some context
would be very appreciated.
And, if there wasn’t an explicit decision, should template-rendering an XComArg
be supported?
TP