eladkal commented on issue #9016:
URL: https://github.com/apache/airflow/issues/9016#issuecomment-636389926


   The ability to render query from file exists in BaseOperator hence can be 
used by all operators by specifying `template_ext`. This is not available in 
Hooks as hooks don't get templated.
   Reading query from file is just one step. What about replacing parameters 
with their run time values? 
   
   I think your use case as presented here is incomplete. df is in memory this 
can't be the final step of your ETL so the question is what are you going to do 
with the df? You are probably writing the result somewhere.
   
   Consider writing your custom operator that utilises PostgresHook add what 
ever steps you wish on the df and then dump it to what ever you want. By doing 
so your problem is solved as you will be able to use `template_ext`


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

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to