FrancescoCastaldi commented on code in PR #43695:
URL: https://github.com/apache/superset/pull/43695#discussion_r4259482965


##########
superset/db_engine_specs/databricks.py:
##########
@@ -629,9 +657,22 @@ class 
DatabricksNativeEngineSpec(DatabricksDynamicBaseEngineSpec):
         
"databricks+connector://token:{access_token}@{host}:{port}/{database_name}"
     )
 
-    # Note: Primary metadata is in DatabricksPythonConnectorEngineSpec which
-    # consolidates all Databricks connection methods. This spec exists for
-    # backwards compatibility with legacy databricks-dbapi connections.
+    metadata = {
+        "description": ("Databricks legacy connector using databricks-dbapi."),
+        "logo": "databricks.png",
+        "homepage_url": "https://www.databricks.com/";,
+        "categories": [
+            DatabaseCategory.CLOUD_DATA_WAREHOUSES,
+            DatabaseCategory.ANALYTICAL_DATABASES,
+            DatabaseCategory.HOSTED_OPEN_SOURCE,
+        ],
+        "pypi_packages": ["databricks-dbapi[sqlalchemy]"],

Review Comment:
   Addressed in commit `8c6a57be8d`.
   
   1. Defined `default_catalog = "hive_metastore"` on 
`DatabricksNativeEngineSpec` and updated `adjust_engine_params` so that when no 
catalog is supplied in `catalog`, `connect_args`, or the URI query, 
`effective_catalog` resolves to `cls.default_catalog` (`hive_metastore`), 
ensuring reflection never queries against `` `None` ``.
   2. Synchronized `connect_args` with the resolved parameters so that 
`catalog`, `schema`, and `http_path` are written to both the URL query and 
`connect_args`, reconciling any stale or conflicting schema values.
   3. Updated the tests in `test_databricks.py` 
(`test_dialect_supports_installed_sqlalchemy` and 
`test_databricks_native_adjust_engine_params`) to feed the returned 
`native_connect_args` directly into `create_engine(native_url, 
connect_args=native_connect_args)`, asserting that the engine dialect 
attributes, connection arguments, and URL query are in complete agreement.



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to