Starrocks (formerly known as DorisDB) SQLAlchemy Dialect
Option A: clone or download this project, and run following cli commands:
cd sqlalchemy-starrocks && python setup.py install
Option B: download the latest release from github and install:
python -m pip install git+https://github.com/ooobug/sqlalchemy-starrocks.git
To connect to Starrocks
, use the following format:
starrocks://<username>:<password>@<host>:<port>/<dbname>[?<options>]
- Python
import sqlalchemy as sa
engine = sa.create_engine('starrocks://test:1234@localhost:9030/test?charset=utf8')
conn = engine.connect()
-
Superset
Test cases are under directory named tests
.
Unit testing is straightforward, just hit
python tests/test_starrocks.py
Furthermore, you can run overall compatibility tests as follows
- DDL
python tests/test_ddl.py
- DML
python tests/test_dml.py
- Query
python tests/test_simple_query.py