Superset Support

Apache Superset is a modern data exploration and visualization platform. It uses SQLAlchemy to query data.

Although Mysql Dialect can be used, it does not support largeint. So we developed StarRocks Dialect.


Notice: If mysqlclient is not installed, an exception will be thrown:

No module named 'MySQLdb'


Since dialect does not contribute to SQLAlchemy, it needs to be installed from the source code.

If you install superset with Docker, install sqlalchemy-starrocks with root.

Install from Source Code

pip install .


pip uninstall sqlalchemy-starrocks


To connect to StarRocks with SQLAlchemy, the following URL pattern can be used:


Basic Example

Sqlalchemy Example

It is recommended to use python 3.x to connect to the StarRocks database, eg:

from sqlalchemy import create_engine
import pandas as pd
conn = create_engine('starrocks://root:@x.x.x.x:9030/superset_db?charset=utf8')
sql = """select * from xxx"""
df = pd.read_sql(sql, conn)

Superset Example

In superset, use Other database, and set url as: