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.3

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.3
File Size Uploaded Provenance
datus_doris-0.1.3.tar.gz 57.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 91.2 kB

Release files / datus_doris-0.1.3.tar.gz

Download URL datus_doris-0.1.3.tar.gz
Size 57.1 kB
Tags Source
SHA-256 checksum
How to use checksums
3af85bf90309d9ec7ebd8f3cc6179cbf165dc3e9f509283794571024eca4038e
BLAKE2b-256 checksum
How to use checksums
5e596f7b1ad8a56f0d66d5a4be298cf7037336827a89af1b782d8439c18cd97a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

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

Download URL datus_doris-0.1.3-py3-none-any.whl
Size 34.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24e21792aa9027beb5a53d68bcd73b11ef92e2a7dce67aaea256cf776c9b0417
BLAKE2b-256 checksum
How to use checksums
65b68b072b16c560c8d660035f9e38d74fa73171d43e15ceffbb33265292fee8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.15

Security for datus-doris 0.1.3

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