You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by vi...@apache.org on 2020/02/08 10:07:24 UTC
[incubator-superset] branch master updated: Add support for
Cockroach DB (#9043)
This is an automated email from the ASF dual-hosted git repository.
villebro pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-superset.git
The following commit(s) were added to refs/heads/master by this push:
new 0cf354c Add support for Cockroach DB (#9043)
0cf354c is described below
commit 0cf354cc88fcaff292ed867766ab6b10115b8221
Author: Arian Treffer <de...@web.de>
AuthorDate: Sat Feb 8 11:07:02 2020 +0100
Add support for Cockroach DB (#9043)
* Add support for Cockroach DB
* Add documentation, fix installation and style for CockroachDB
* Fix formatting for black
---
docs/index.rst | 1 +
docs/installation.rst | 2 ++
setup.py | 1 +
superset/db_engine_specs/cockroachdb.py | 21 +++++++++++++++++++++
4 files changed, 25 insertions(+)
diff --git a/docs/index.rst b/docs/index.rst
index a2b8335..ba32a7f 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -110,6 +110,7 @@ The following RDBMS are currently supported:
- `Apache Spark SQL <https://spark.apache.org/sql/>`_
- `BigQuery <https://cloud.google.com/bigquery/>`_
- `ClickHouse <https://clickhouse.yandex/>`_
+- `CockroachDB <https://www.cockroachlabs.com/>`_
- `Dremio <https://dremio.com/>`_
- `Elasticsearch <https://www.elastic.co/products/elasticsearch/>`_
- `Exasol <https://www.exasol.com/>`_
diff --git a/docs/installation.rst b/docs/installation.rst
index 1d9955e..b0a49ce 100644
--- a/docs/installation.rst
+++ b/docs/installation.rst
@@ -372,6 +372,8 @@ Here's a list of some of the recommended packages.
+------------------+---------------------------------------+-------------------------------------------------+
| ClickHouse | ``pip install sqlalchemy-clickhouse`` | |
+------------------+---------------------------------------+-------------------------------------------------+
+| CockroachDB | ``pip install cockroachdb`` | ``cockroachdb://`` |
++------------------+---------------------------------------+-------------------------------------------------+
| Dremio | ``pip install sqlalchemy_dremio`` | ``dremio://user:pwd@host:31010/`` |
+------------------+---------------------------------------+-------------------------------------------------+
| Elasticsearch | ``pip install elasticsearch-dbapi`` | ``elasticsearch+http://`` |
diff --git a/setup.py b/setup.py
index f4b5173..8498e5c 100644
--- a/setup.py
+++ b/setup.py
@@ -119,6 +119,7 @@ setup(
"druid": ["pydruid==0.5.7", "requests==2.22.0"],
"hana": ["hdbcli==2.4.162", "sqlalchemy_hana==0.4.0"],
"dremio": ["sqlalchemy_dremio>=0.5.0dev0"],
+ "cockroachdb": ["cockroachdb==0.3.3"],
},
python_requires="~=3.6",
author="Apache Software Foundation",
diff --git a/superset/db_engine_specs/cockroachdb.py b/superset/db_engine_specs/cockroachdb.py
new file mode 100644
index 0000000..09fa98d
--- /dev/null
+++ b/superset/db_engine_specs/cockroachdb.py
@@ -0,0 +1,21 @@
+# 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.
+from superset.db_engine_specs.postgres import PostgresEngineSpec
+
+
+class CockroachDbEngineSpec(PostgresEngineSpec):
+ engine = "cockroachdb"