Python connector
Query e6data from Python with the e6data Python connector - install, connect, and run queries.
The e6data Python connector runs SQL from Python applications, notebooks, and ETL scripts. It's a separate pip-installable package - for resource automation (managing clusters and catalogs), use the Management API instead.
Install
pip install e6data-python-connectorConnect and query
from e6data_python_connector import Connection
conn = Connection(
host="<HOST>",
port=<PORT>,
username="<EMAIL>", # your e6data email
password="<TOKEN>", # a personal access token
database="<SCHEMA>",
cluster_uuid="<CLUSTER_UUID>",
secure=True, # use TLS
)
cursor = conn.cursor(catalog_name="<CATALOG>")
query_id = cursor.execute("SELECT * FROM your_table LIMIT 10")
for row in cursor.fetchall():
print(row)Find your host, port, and cluster UUID in the Console under Cluster → Connectivity, and create a token under Profile → Settings. Keep the token out of source - read it from an environment variable or a secrets manager. The full parameter and cursor reference is in Python connector reference.
See also
REST API for SQL queries - a driverless alternative.
Last updated
Was this helpful?

