pankajastro commented on code in PR #24617:
URL: https://github.com/apache/airflow/pull/24617#discussion_r905088559
##########
airflow/providers/databricks/hooks/databricks.py:
##########
@@ -408,3 +410,19 @@ def get_repo_by_path(self, path: str) -> Optional[str]:
raise e
return None
+
+ def test_connection(self):
+ """Test the Databricks connectivity from UI"""
+ status, message = False, ''
+ hook = DatabricksHook(databricks_conn_id=self.databricks_conn_id)
+ try:
+ result =
hook._do_api_call(endpoint_info=LIST_ZONES_ENDPOINT).get('zones', [])
+ if result:
+ self.log.info(result)
Review Comment:
Please correct me if I'm wrong.
This log won't be available in airflow UI or in the browser console. So
since we are already raise exceptions in case of error which would be available
in UI, this line does not add much value so either we should keep it as debug
or remove it.
--
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]