diff --git a/docs/index.rst b/docs/index.rst index 5a3a2748c74c..b3a444abcd59 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -109,6 +109,7 @@ The following RDBMS are currently supported: - `Apache Spark SQL `_ - `BigQuery `_ - `ClickHouse `_ +- `CockroachDB `_ - `Dremio `_ - `Elasticsearch `_ - `Exasol `_ diff --git a/docs/installation.rst b/docs/installation.rst index 1d9955e196c7..b0a49cec8af6 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 f4b5173830f9..8498e5c7a30e 100644 --- a/setup.py +++ b/setup.py @@ -119,6 +119,7 @@ def get_git_sha(): "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 000000000000..09fa98d587a0 --- /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"