Install Database Drivers

Superset requires a Python DB-API database driver and a SQLAlchemy dialect to be installed for each datastore you want to connect to.

You can read more here about how to install new database drivers into your Superset configuration.

Supported Databases and Dependencies

Superset does not ship bundled with connectivity to databases, except for SQLite, which is part of the Python standard library. You’ll need to install the required packages for the database you want to use as your metadata database as well as the packages needed to connect to the databases you want to access through Superset.

Some of the recommended packages are shown below. Please refer to setup.py for the versions that are compatible with Superset.

Database PyPI package Connection String
--- --- ---
Amazon Athena pip install pyathena[pandas] , pip install PyAthenaJDBC awsathena+rest://{aws_access_key_id}:{aws_secret_access_key}@athena.{region_name}.amazonaws.com/{schema_name}?s3_staging_dir={s3_staging_dir}&…
Apache Doris pip install pydoris doris://<User>:<Password>@<Host>:<Port>/<Catalog>.<Database>
Amazon DynamoDB pip install pydynamodb dynamodb://{access_key_id}:{secret_access_key}@dynamodb.{region_name}.amazonaws.com?connector=superset
Amazon Redshift pip install sqlalchemy-redshift redshift+psycopg2://<userName>:<DBPassword>@<AWS End Point>:5439/<Database Name>
Apache Drill pip install sqlalchemy-drill drill+sadrill:// For JDBC drill+jdbc://
Apache Druid pip install pydruid druid://<User>:<password>@<Host>:<Port-default-9088>/druid/v2/sql
Apache Hive pip install pyhive hive://hive@{hostname}:{port}/{database}
Apache Impala pip install impyla impala://{hostname}:{port}/{database}
Apache Kylin pip install kylinpy kylin://<username>:<password>@<hostname>:<port>/<project>?<param1>=<value1>&<param2>=<value2>
Apache Pinot pip install pinotdb pinot://BROKER:5436/query?server=http://CONTROLLER:5983/
Apache Solr pip install sqlalchemy-solr solr://{username}:{password}@{hostname}:{port}/{server_path}/{collection}
Apache Spark SQL pip install pyhive hive://hive@{hostname}:{port}/{database}
Ascend.io pip install impyla ascend://{username}:{password}@{hostname}:{port}/{database}?auth_mechanism=PLAIN;use_ssl=true
Azure MS SQL pip install pymssql mssql+pymssql://UserName@presetSQL:TestPassword@presetSQL.database.windows.net:1433/TestSchema
Big Query pip install sqlalchemy-bigquery bigquery://{project_id}
ClickHouse pip install clickhouse-connect clickhousedb://{username}:{password}@{hostname}:{port}/{database}
CockroachDB pip install cockroachdb cockroachdb://root@{hostname}:{port}/{database}?sslmode=disable
Dremio pip install sqlalchemy_dremio dremio://user:pwd@host:31010/
Elasticsearch pip install elasticsearch-dbapi elasticsearch+http://{user}:{password}@{host}:9200/
Exasol pip install sqlalchemy-exasol exa+pyodbc://{username}:{password}@{hostname}:{port}/my_schema?CONNECTIONLCALL=en_US.UTF-8&driver=EXAODBC
Google Sheets pip install shillelagh[gsheetsapi] gsheets://
Firebolt pip install firebolt-sqlalchemy firebolt://{username}:{password}@{database} or firebolt://{username}:{password}@{database}/{engine_name}
Hologres pip install psycopg2 postgresql+psycopg2://<UserName>:<DBPassword>@<Database Host>/<Database Name>
IBM Db2 pip install ibm_db_sa db2+ibm_db://
IBM Netezza Performance Server pip install nzalchemy netezza+nzpy://<UserName>:<DBPassword>@<Database Host>/<Database Name>
MySQL pip install mysqlclient mysql://<UserName>:<DBPassword>@<Database Host>/<Database Name>
Oracle pip install cx_Oracle oracle://
PostgreSQL pip install psycopg2 postgresql://<UserName>:<DBPassword>@<Database Host>/<Database Name>
Presto pip install pyhive presto://
Rockset pip install rockset-sqlalchemy rockset://<api_key>:@<api_server>
SAP Hana pip install hdbcli sqlalchemy-hana or pip install apache-superset[hana] hana://{username}:{password}@{host}:{port}
StarRocks pip install starrocks starrocks://<User>:<Password>@<Host>:<Port>/<Catalog>.<Database>
Snowflake pip install snowflake-sqlalchemy snowflake://{user}:{password}@{account}.{region}/{database}?role={role}&warehouse={warehouse}
SQLite No additional library needed sqlite://path/to/file.db?check_same_thread=false
SQL Server pip install pymssql mssql+pymssql://
Teradata pip install teradatasqlalchemy teradatasql://{user}:{password}@{host}
TimescaleDB pip install psycopg2 postgresql://<UserName>:<DBPassword>@<Database Host>:<Port>/<Database Name>
Trino pip install trino trino://{username}:{password}@{hostname}:{port}/{catalog}
Vertica pip install sqlalchemy-vertica-python vertica+vertica_python://<UserName>:<DBPassword>@<Database Host>/<Database Name>
YugabyteDB pip install psycopg2 postgresql://<UserName>:<DBPassword>@<Database Host>/<Database Name>

Note that many other databases are supported, the main criteria being the existence of a functional SQLAlchemy dialect and Python driver. Searching for the keyword “sqlalchemy + (database name)” should help get you to the right place.

If your database or data engine isn’t on the list but a SQL interface exists, please file an issue on the Superset GitHub repo, so we can work on documenting and supporting it.

If you’d like to build a database connector for Superset integration, read the following tutorial.