You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I use Taskflow, and especially the @task decorator to create a task, the template files are not correctly rendered : I still have the filename inside templates_dict instead of the templated file content, even though I supplied a valid templates_exts argument (at least one which works with PythonOperator).
I do not encounter the same issue using the old PythonOperator syntax.
What you expected to happen
I expect that the behavior of the @task decorator would be the same as the PythonOperator class, or at least have a workaround explained in the documentation such as other arguments I would need to provide.
Feel free @Bowrna :) - unless @xingularity raises a hand (and @esthomw - you could also help with reviewing and testing the change if you don't feel like implementing it).
@potiuk I would love to address that issue, however, I am not sure if I currently have enough time. In that case please go ahead @Bowrna :) I will try to help with reviewing and testing
Apache Airflow version
2.2.2
What happened
When I use Taskflow, and especially the
@task
decorator to create a task, the template files are not correctly rendered : I still have the filename insidetemplates_dict
instead of the templated file content, even though I supplied a validtemplates_exts
argument (at least one which works withPythonOperator
).I do not encounter the same issue using the old
PythonOperator
syntax.What you expected to happen
I expect that the behavior of the
@task
decorator would be the same as thePythonOperator
class, or at least have a workaround explained in the documentation such as other arguments I would need to provide.How to reproduce
Sample code below :
Which returns
INFO - query: sql/sample.sql
.However, if I use a
PythonOperator
with the old syntax it works :I get the entire templated file inside
kwargs["templates_dict"]["query"]
, not just its name.Operating System
AWS MWAA
Versions of Apache Airflow Providers
Not sure if relevant here since I only use Airflow packages in the example.
Deployment
MWAA
Deployment details
No response
Anything else
No response
Are you willing to submit PR?
Code of Conduct
The text was updated successfully, but these errors were encountered: