datus-doris
Apache Doris database adapter for Datus.
Features
- MySQL-protocol connection and SQL execution
- Multi-catalog discovery and context switching
- Catalog-aware table, view, schema, and sample-row metadata
- Asynchronous materialized-view discovery and DDL retrieval
- Three-part identifiers:
catalog.database.table - Doris migration capability, table-layout, and type-mapping guidance
- List, CSV, Pandas, and Arrow result formats inherited from
datus-mysql
Installation
pip install datus-doris
The package installs datus-db-core and datus-mysql as dependencies and
registers the doris adapter through the datus.adapters entry-point group.
Configuration
database:
type: doris
host: localhost
port: 9030
username: root
password: ""
catalog: internal
database: analytics
The built-in catalog is internal. External catalogs, including Hive Metastore
catalogs, can be selected through the same connector API.
Python API
from datus_doris import DorisConfig, DorisConnector
config = DorisConfig(
host="localhost",
port=9030,
username="root",
password="",
catalog="internal",
database="analytics",
)
with DorisConnector(config) as connector:
catalogs = connector.get_catalogs()
tables = connector.get_tables(database_name="analytics")
views = connector.get_views(database_name="analytics")
materialized_views = connector.get_materialized_views_with_ddl(
database_name="analytics"
)
result = connector.execute_query("SELECT 1")
Catalog context can be switched explicitly:
connector.switch_catalog("hive_catalog")
databases = connector.get_databases()
connector.switch_catalog("internal")
Fully qualified identifiers are rendered as Doris three-part names:
connector.full_name(
catalog_name="internal",
database_name="analytics",
table_name="events",
)
# `internal`.`analytics`.`events`
Development and testing
Unit tests do not require a database:
ci/run-unit-tests.sh datus-doris
The repository integration runner starts Apache Doris FE/BE 4.0.7 and Hive Metastore 4.0.1, waits for an alive backend and a successful OLAP DDL probe, runs the complete integration suite, and removes the test services afterward:
ci/run-integration-tests.sh doris
To run the package-local workflow manually:
cd datus-doris
docker compose up -d --wait
./scripts/test.sh integration
docker compose down -v
The integration suite covers catalog operations, Hive external catalogs, tables, views, asynchronous materialized views, DDL/DML, sample rows, TPC-H queries, and list/CSV/Pandas/Arrow output.
Environment variables
| Variable | Default | Description |
|---|---|---|
DORIS_HOST |
localhost |
FE query host |
DORIS_PORT |
9030 |
MySQL protocol port |
DORIS_USER |
root |
Username |
DORIS_PASSWORD |
empty | Password |
DORIS_CATALOG |
internal |
Initial catalog |
DORIS_DATABASE |
test |
Test database |
DORIS_FE_JAVA_XMS |
1024m |
Initial FE JVM heap for the Docker test environment |
DORIS_FE_JAVA_XMX |
2048m |
Maximum FE JVM heap for the Docker test environment |
HIVE_METASTORE_URI |
thrift://hive-metastore:9083 |
Hive catalog metastore URI |
License
Apache License 2.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file datus_doris-0.1.0.tar.gz.
File metadata
- Download URL: datus_doris-0.1.0.tar.gz
- Upload date:
- Size: 25.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48bd38f688c88532b21cc54346dce8f9b0ac15d51f25c2414abfd9251633657f
|
|
| MD5 |
0f2fe50db3f5fb59d204ba35643a4929
|
|
| BLAKE2b-256 |
a6c08ebe27d97c1c8f384467eaf4a3a4998806cc0d8c8da0195fcd165b1105e9
|
File details
Details for the file datus_doris-0.1.0-py3-none-any.whl.
File metadata
- Download URL: datus_doris-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.13
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
893fbab17c513eb1087645c3e0ec95255afff22a54d35c37b22154dbc008e574
|
|
| MD5 |
22148d4d48f8010f7e378119b97b454f
|
|
| BLAKE2b-256 |
1c2d2546223715b3867f45694d5acfe0df6282b414bf94c6f49be5b36d2a1ac5
|