feat: add Databricks DB engine spec (#13682)
(cherry picked from commit adc247b7e4fade7ef0d68cb07df5e3aa6bf9a677)
diff --git a/setup.py b/setup.py
index c89910c..3785d5b 100644
--- a/setup.py
+++ b/setup.py
@@ -118,10 +118,11 @@
"pybigquery>=0.4.10",
"google-cloud-bigquery>=2.4.0",
],
- "clickhouse": ["clickhouse-sqlalchemy>= 0.1.4, <0.2"],
+ "clickhouse": ["clickhouse-sqlalchemy>=0.1.4, <0.2"],
"cockroachdb": ["cockroachdb>=0.3.5, <0.4"],
"cors": ["flask-cors>=2.0.0"],
"crate": ["crate[sqlalchemy]>=0.26.0, <0.27"],
+ "databricks": ["databricks-dbapi[sqlalchemy]>=0.5.0, <0.6"],
"db2": ["ibm-db-sa>=0.3.5, <0.4"],
"dremio": ["sqlalchemy-dremio>=1.1.5, <1.2"],
"drill": ["sqlalchemy-drill==0.1.dev"],
diff --git a/superset/db_engine_specs/databricks.py b/superset/db_engine_specs/databricks.py
new file mode 100644
index 0000000..d67370b
--- /dev/null
+++ b/superset/db_engine_specs/databricks.py
@@ -0,0 +1,23 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.o
+from superset.db_engine_specs.hive import HiveEngineSpec
+
+
+class DatabricksHiveEngineSpec(HiveEngineSpec):
+ engine = "databricks"
+ engine_name = "Databricks Hive"
+ driver = "pyhive"