GitHub user potiuk added a comment to the discussion: Is on_execute_callback 
can be used to initialize operators parameters at execution ?

Actually the "hack" is better. The problem with your solution @enchant3dmango 
is that it retrieves connection during Dag parsing, which is a bad idea - and 
against good practices. 

The on_exec_callback is actually guaranteed to be executed in the same 
interpreter, with the same context as the operaror. so this is actually quite a 
good solution if it works. Maybe even a good idea to contribute it to the docs 
as recommended @darkag 

GitHub link: 
https://github.com/apache/airflow/discussions/58493#discussioncomment-15201599

----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]

Reply via email to