utkarshgupta137 edited a comment on issue #13559:
URL: https://github.com/apache/airflow/issues/13559#issuecomment-922331197
I was having a similar problem: I wanted to pass a templated argument to a
function, but it kept getting passed as raw template instead of rendered one.
The solution is to call the macro inside a pythonoperator & pass the data
using xcoms.
```
def get_date(**kwargs):
# {{ dag_run.conf.get("date", "{{ ds_no_dash }}") }} doesn't work
ds = kwargs["ds_no_dash"]
date = kwargs["dag_run"].conf.get("date", ds)
kwargs["ti"].xcom_push("date", base_data)
```
--
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]