Skip to main content

datus-doris

Apache Doris database adapter for Datus.

Timeouts

timeout_seconds (default 30, positive seconds) bounds pool checkout and is also the default for PyMySQL connect, read, and write timeouts. Override these independently with connect_timeout_seconds, read_timeout_seconds, and write_timeout_seconds. None inherits the finite default. Long queries may need a larger read timeout. Optional query_timeout_seconds configures the server's SELECT deadline on every physical connection; it defaults to None (preserve server settings). Socket inactivity timeouts are not total query deadlines. See timeout semantics and adapter audit.

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 4.1.3 (FE and BE in one apache/doris:all-in-one-4.1.3 container) 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
HIVE_METASTORE_URI thrift://hive-metastore:9083 Hive catalog metastore URI
DORIS_QUERY_HOST_PORT 9030 Host port mapped to the container query port
DORIS_HTTP_HOST_PORT 8030 Host port mapped to the container FE HTTP port

The apache/doris:all-in-one-4.1.3 image carries its own integration-test FE and BE configuration, so there are no heap or replication knobs to set here. FE_CONFIG_EXTRA and BE_CONFIG_EXTRA are appended to fe.conf / be.conf at startup if a single setting ever needs overriding.

License

Apache License 2.0

Metadata

Release files for datus-doris 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datus-doris 0.1.5
File Size Uploaded Provenance Actions
datus_doris-0.1.5.tar.gz 58.0 kB Without provenance Details for datus_doris-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for datus-doris 0.1.5
File Interpreter ABI Platform Actions
datus_doris-0.1.5-py3-none-any.whl Python 3 none any Details for datus_doris-0.1.5-py3-none-any.whl

Total release size: 92.3 kB

Release files / datus_doris-0.1.5.tar.gz

Download URL datus_doris-0.1.5.tar.gz
Size 58.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7f12eb4e93cdb859ab300d3f6791e0bee013b3dda2f1a9d4e4f78d42ed6466d9
BLAKE2b-256 checksum
How to use checksums
7e5acfd602d613c65565b754edb2d80eca1837285c851ecb81ab05a2b2e5f48d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Release files / datus_doris-0.1.5-py3-none-any.whl

Download URL datus_doris-0.1.5-py3-none-any.whl
Size 34.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
095dcfb68942bf60768cddb56e4e4a788bc7d8988078a320ac72ba62db5b9d05
BLAKE2b-256 checksum
How to use checksums
f1a4ee42e5427d2dba6fb11adafc631c21c57dda7f5679a4b8d6f1f9a9231a34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.16

Security for datus-doris 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page