daft-doris
Independent Daft read and Stream Load write support for Apache Doris.
This project is in alpha development. It keeps the Doris read path explicit between MySQL and Flight and adds a separate HTTP Stream Load writer. The write contract is intentionally batch-oriented: each Stream Load request is atomic, while a DataFrame write may contain multiple independent requests.
Installation
uv add "daft-doris[doris]"
Install daft-doris[doris-flight] for Doris Flight reads or daft-doris[ray] for the supported Daft Ray read profile. The first-release Doris writer requires Daft's native runner and rejects Ray before metadata discovery.
Write example
from daft_doris import DorisConnection, DorisTable, SecretRef, write_doris
result = write_doris(
df,
connection=DorisConnection(
host="doris-fe.example",
username="daft_writer",
password=SecretRef.env("DORIS_PASSWORD"),
http_port=8030,
redirect_hosts=("doris-be.example",),
redirect_ports=(8040,),
),
table=DorisTable(database="analytics", name="events"),
operation="load",
)
load sends complete rows as Parquet and delegates Duplicate Key, Unique Key, and Aggregate Key semantics to Doris. upsert validates a Unique Key table. partial_update sends line-delimited JSON and requires a Merge-on-Write Unique Key table.
Write planning uses the Doris MySQL authority for SHOW CREATE TABLE and DESCRIBE, so the write user needs the corresponding metadata privileges in addition to the table load privilege. FE-to-BE redirects require an explicit host and port allowlist; the connector never follows an arbitrary redirect.
The writer does not automatically retry a request whose commit state is unknown, and it does not claim whole-DataFrame atomicity or exactly-once delivery under executor retry. A request-body failure before transmission is reported separately from an ambiguous post-transmission, response-loss, or malformed-response failure. Custom CA and mTLS are not part of the first-release TLS profile.
Read example
from daft_doris import read_doris
df = read_doris(
host="doris-fe.example",
database="analytics",
table="events",
transport="mysql",
)
The read transport is explicit and never changes after a failure. Flight remains an independently selected optional transport.
Development
uv sync --all-extras --group dev
uv run ruff check src tests scripts
uv run ruff format --check src tests scripts
uv run mypy src tests/unit tests/contract
uv run pytest tests/unit tests/contract -m "not ray"
uv run pytest tests/unit tests/contract -m "ray" -vv
uv run pytest tests/unit tests/contract -m "not ray" --cov=daft_doris.write --cov=daft_doris._common --cov-branch
uv run python -m build
uv run twine check dist/*
uv run codespell
The real Doris suite is intentionally separate and requires Docker:
./scripts/run_doris_it.sh
See docs/writing.md and docs/consistency.md for the complete contract.
Metadata
Release files for daft-doris 1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| daft_doris-1.0.tar.gz | 88.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| daft_doris-1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 155.4 kB
Release files / daft_doris-1.0.tar.gz
| Download URL | daft_doris-1.0.tar.gz |
|---|---|
| Size | 88.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
43450c9088c5f25ac25934ac896b4c4c8a1c7df15e6680559b299d668fd3cf4a
|
|
BLAKE2b-256 checksum How to use checksums |
3ecdb8f2453d39f5af496c66c16d23baa59be82eb1b815726696db7f39495086
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency logRelease files / daft_doris-1.0-py3-none-any.whl
| Download URL | daft_doris-1.0-py3-none-any.whl |
|---|---|
| Size | 66.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
72a19e2f300a955ac7a12a263ae9a0a332019126c9efa7b04800575e96b51593
|
|
BLAKE2b-256 checksum How to use checksums |
bd2b78c76b5fd313051841b4cc800f7495e01a4c123963f9eeb2c2d0dc57e474
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Aug 17, 2026.
Transparency log