Skip to main content

Python interface to Doris

Project description

Apache Doris Python Client

A Apache Doris client for the Python programming language.

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. All this makes Apache Doris an ideal tool for scenarios including report analysis, ad-hoc query, unified data warehouse, and data lake query acceleration. On Apache Doris, users can build various applications, such as user behavior analysis, AB test platform, log retrieval analysis, user portrait analysis, and order analysis.

Installation

pip install pydoris

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()

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-1.1.0.tar.gz (11.3 kB view details)

Uploaded Source

Built Distribution

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

pydoris-1.1.0-py3-none-any.whl (13.0 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pydoris-1.1.0.tar.gz
  • Upload date:
  • Size: 11.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pydoris-1.1.0.tar.gz
Algorithm Hash digest
SHA256 67a5f246de66ffbfbdae341b404cdfdbc59f142c9c46a27cc35335f1d229695a
MD5 29e701a5dc7b4f068cf6727696875de4
BLAKE2b-256 610b6fe9f58ae6ab77df26454392c501484618e424715077228a4bc9aa8ce795

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pydoris-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 13.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.12

File hashes

Hashes for pydoris-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b37f4cb5f79d734071591736e040043c2d59724f97b6d78fc4b99db36608ad16
MD5 414d196d462e2734f420da7896249b23
BLAKE2b-256 d6e3b3ca8fc9be144837216508fb78ba2808bbeaa388ace6ea99ae4c0939246a

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