GitHub user potiuk added a comment to the discussion: Why doesn't 
self.log.info("Hello World") or print("Hello World") work in the __init__ 
method of my Custom Operator?

Because operator is created when DAG structure is created - and the others are 
run when the task is executed. This is basic assumpion - see also 
https://airflow.apache.org/docs/apache-airflow/stable/best-practices.html#top-level-python-code.
 The `__init__` of your operator - unlike the other methods you mentioned - are 
"top level code" for your DAG and they are executed in parse time not "Task 
execution" time. 

GitHub link: 
https://github.com/apache/airflow/discussions/44649#discussioncomment-11465280

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

Reply via email to