kacpermuda commented on code in PR #50392: URL: https://github.com/apache/airflow/pull/50392#discussion_r2084266299
########## providers/databricks/src/airflow/providers/databricks/hooks/databricks_sql.py: ########## @@ -309,3 +318,83 @@ def bulk_dump(self, table, tmp_file): def bulk_load(self, table, tmp_file): raise NotImplementedError() + + def get_openlineage_database_info(self, connection) -> DatabaseInfo: + from airflow.providers.openlineage.sqlparser import DatabaseInfo + + return DatabaseInfo( + scheme=self.get_openlineage_database_dialect(connection), + authority=self._get_openlineage_authority(connection), + database=self.catalog, + information_schema_columns=[ + "table_schema", + "table_name", + "column_name", + "ordinal_position", + "data_type", + "table_catalog", + ], + is_information_schema_cross_db=True, + ) + + def get_openlineage_database_dialect(self, _) -> str: + return "databricks" + + def get_openlineage_default_schema(self) -> str | None: + return self.schema or "default" + + def _get_openlineage_authority(self, _) -> str | None: Review Comment: I removed this method enitrely. I thought it's required to implement by DbApiHook, but it was only a helper method in case of other db's. -- 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-unsubscr...@airflow.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org