Skip to main content

Exasol python driver with extra features

Project description

Pyexasol

Continuous Integration (master) Anaconda PyPi Package Downloads Supported Python Versions

PyEXASOL is the officially supported Python connector for Exasol. It helps to handle massive volumes of data commonly associated with this DBMS.

You may expect significant performance improvement over ODBC in a single process scenario involving pandas.

PyEXASOL provides API to read & write multiple data streams in parallel using separate processes, which is necessary to fully utilize hardware and achieve linear scalability. With PyEXASOL you are no longer limited to a single CPU core.

Quick links

PyEXASOL main concepts

  • Based on WebSocket protocol;
  • Optimized for minimum overhead;
  • Easy integration with pandas via HTTP transport;
  • Compression to reduce network bottleneck;

System requirements

  • Exasol >= 7.1
  • Python >= 3.9

Getting started

Install PyEXASOL:

pip install pyexasol[pandas]

Run basic query:

import pyexasol

C = pyexasol.connect(dsn='<host:port>', user='sys', password='exasol')

stmt = C.execute("SELECT * FROM EXA_ALL_USERS")

for row in stmt:
    print(row)

Load data into pandas.DataFrame:

import pyexasol

C = pyexasol.connect(dsn='<host:port>', user='sys', password='exasol', compression=True)

df = C.export_to_pandas("SELECT * FROM EXA_ALL_USERS")
print(df.head())

You may set up local config to store your personal Exasol credentials and connection options:

import pyexasol

C = pyexasol.connect_local_config('my_config')

stmt = C.execute("SELECT CURRENT_TIMESTAMP")
print(stmt.fetchone())

Connect to Exasol SAAS using OpenID token for authentication:

import pyexasol

C = pyexasol.connect(dsn='<host:port>', user='sys', refresh_token='<token>')

stmt = C.execute("SELECT * FROM EXA_ALL_USERS")

for row in stmt:
    print(row)

Created by

Vitaly Markov, 2018 — 2022

Enjoy!

Maintained by

Exasol 2023 — Today

Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

pyexasol-0.27.0.tar.gz (49.0 kB view hashes)

Uploaded Source

Built Distribution

pyexasol-0.27.0-py3-none-any.whl (57.1 kB view hashes)

Uploaded Python 3

Supported by

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