potiuk commented on issue #17055:
URL: https://github.com/apache/airflow/issues/17055#issuecomment-882081645


   It does not work this way. get_hook() method is implemented by instantiating 
new hook class and passes connection id as parameter - which in turn will 
create a new connection class using standard mechanisms (from db or from 
variable).
   
   Connections should be immutable in your tasks. You should not attempt to 
dynamically modify them. You can always create a new connection with different 
id and different extra and use this other id. In some methods/objects 
connections are cached and in some they are recreated and trying to modify them 
on the flight is a bad idea. 


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


Reply via email to