You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@airflow.apache.org by "JDarDagran (via GitHub)" <gi...@apache.org> on 2023/09/04 09:43:21 UTC

[GitHub] [airflow] JDarDagran commented on a diff in pull request #33959: openlineage, dbt: add OpenLineage support for DBT Cloud

JDarDagran commented on code in PR #33959:
URL: https://github.com/apache/airflow/pull/33959#discussion_r1314698739


##########
airflow/providers/openlineage/plugins/listener.py:
##########
@@ -202,3 +204,11 @@ def on_dag_run_failed(self, dag_run: DagRun, msg: str):
             self.log.error("Executor have not started before `on_dag_run_failed`")
             return
         self.executor.submit(self.adapter.dag_failed, dag_run=dag_run, msg=msg)
+
+
+def get_openlineage_listener() -> OpenLineageListener:

Review Comment:
   The primary motivation is to obtain an instance of the OpenLineageClient. It's advisable to create just one instance of the OpenLineageListener, as there is no requirement for additional instances. This single-instance approach convinced me to acquire the listener instead of the client. Additionally, this approach offers more flexibility in accessing other attributes of the OpenLineage listener if the need arises.



-- 
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: commits-unsubscribe@airflow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org