Skip to main content

Python interface to Doris (custom build with relaxed dependencies)

Project description

Apache Doris Python Client (Custom Build)

A Apache Doris client for the Python programming language.

This is a custom build with relaxed dependency constraints (sqlalchemy-utils removed as it's not actually used in the code).

Apache Doris is a high-performance, real-time analytical database based on MPP architecture, known for its extreme speed and ease of use. It only requires a sub-second response time to return query results under massive data and can support not only high-concurrent point query scenarios but also high-throughput complex analysis scenarios.

Installation

pip install pydoris-custom

Or install from source:

pip install .

SQLAlchemy Usage

To connect to doris using SQLAlchemy, use a connection string (URL) following this pattern:

  • User: User Name
  • Password: Password
  • Host: doris FE Host
  • Port: doris FE port
  • Catalog: Catalog Name
  • Database: Database Name

Here's what the connection string looks like:

doris://<User>:<Password>@<Host>:<Port>/<Database>
pydoris://<User>:<Password>@<Host>:<Port>/<Database>
doris://<User>:<Password>@<Host>:<Port>/<Catalog>.<Database>
pydoris://<User>:<Password>@<Host>:<Port>/<Catalog>.<Database>

Example

It is recommended to use python 3.x to connect to the doris database, eg:

from sqlalchemy import create_engine
from sqlalchemy.schema import Table, MetaData
from sqlalchemy.sql.expression import select, text

engine = create_engine('doris://root:xxx@localhost:9030/hive_catalog.hive_db')
connection = engine.connect()

rows = connection.execute(text("SELECT * FROM hive_table")).fetchall()

Differences from Official Package

This custom build removes the sqlalchemy-utils dependency which is not actually used in the code.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pydoris_custom-1.1.0.tar.gz (7.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pydoris_custom-1.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file pydoris_custom-1.1.0.tar.gz.

File metadata

  • Download URL: pydoris_custom-1.1.0.tar.gz
  • Upload date:
  • Size: 7.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for pydoris_custom-1.1.0.tar.gz
Algorithm Hash digest
SHA256 c15258d8115b50ed855bc3897b8cbb1639a5bbeb34861ce8662bacdde58ca155
MD5 01055caf8b5d64ba67f8d9aa318a35eb
BLAKE2b-256 9f6705c9310aca1fbf315b7bdae4dbc32e241e53abff6e541d1b3ad1127c73fd

See more details on using hashes here.

File details

Details for the file pydoris_custom-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: pydoris_custom-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.16

File hashes

Hashes for pydoris_custom-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 7dee602acfdae385e75692703ae1020d8e99d4244f40ad23a519cea8eab71fec
MD5 f4bef5f74ba2b5b5dcdc6bf979a398db
BLAKE2b-256 0fed17899ca1e7a9051e29fea1de4f9fc2f3f51c4c430af212d7edcf3d758e1b

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page