Skip to main content

Before you start

You need: Find the host, port and cluster name in the console under Cluster → Connectivity.
1

Install the connector

Install the package from PyPI.
terminal
On Amazon Linux, CentOS, Ubuntu or Debian, install the build dependencies first if the install fails:
2

Set your credentials

Set the cluster host, your e6data email and your access token as environment variables. Do not hardcode them in your script.
terminal
3

Connect and run a query

Open a connection to the cluster, create a cursor on your catalog, and run SQL.
query.py
Large results. Use cursor.fetchmany(500) to limit rows, or loop over cursor.fetchall_buffer() to stream rows without loading them all into memory.
4

Close the connection

Clear and close the cursor, then close the connection. This frees old results from memory.
query.py

Windows setup

The connector uses a C-based deserialization library (fastbinary). On Windows it works only when Visual C++ Build Tools are installed. Without them you see this error:
To fix it:
  1. Install Visual C++ Build Tools and select the Desktop Development with C++ workload. Launch the Build Tools once after installing.
  2. Create and activate a virtual environment:
  3. Install the connector in that environment:
If you can’t install the build tools, pass require_fastbinary=False to Connection. The connector then uses a pure-Python deserializer, which is about 2 to 3 times slower but otherwise works the same.

Python connector reference

Reference · Connection parameters and the cursor API.

REST API for SQL queries

How-to · A driverless alternative over HTTPS.

Personal access tokens

Platform · Tokens the connector signs in with.
Source code: e6data-python-connector on GitHub · Package: PyPI
Last modified on September 29, 2026