SQLAlchemy-Exasol is a dialect for SQLAlchemy that allows Python applications to connect and interact with an Exasol database. It provides support for both WebSocket and ODBC-based connections to Exasol. The current version is 6.1.1, with releases typically occurring every 1-3 months to introduce new features, fix bugs, and maintain compatibility with Python and SQLAlchemy updates.
pip install sqlalchemy-exasolVerified import paths — ran on the pinned version, not inferred.
This quickstart demonstrates how to establish a connection to an Exasol database using `sqlalchemy-exasol` with the default WebSocket driver. It configures connection parameters from environment variables (or defaults), creates an engine, tests the connection with a simple query, and shows how to create a schema and a table.
Update your SQLAlchemy code to use SQLAlchemy 2.0 patterns (e.g., `select()` constructs, session management, `insert().values()`). Refer to SQLAlchemy 2.0 migration guides.
Upgrade your Python environment to version 3.10 or newer. `sqlalchemy-exasol` 6.1.1 requires Python <3.14,>=3.10.
Upgrade to `sqlalchemy-exasol==6.1.1` or newer. If on an older version, carefully re-evaluate ORM flushing logic involving auto-incremented IDs.
Prefer `exasol+websocket://` connection strings. If you still require ODBC, install `sqlalchemy-exasol[odbc]` and ensure `pyodbc` is installed and configured correctly, but be aware of its deprecated status.
Update your query patterns to SQLAlchemy 2.0. For direct SQL, use `session.execute(text('SELECT ...'))`. For ORM, ensure `select()` operates on mapped entities or use the `scalar_one()` / `scalars()` methods on the result.Install the `pyodbc` package by running `pip install pyodbc` or `pip install "sqlalchemy-exasol[odbc]"`. Ensure you have the necessary Exasol ODBC driver installed on your system.
Upgrade `sqlalchemy-exasol` to version `6.1.1` or newer. Review your ORM code, especially around `session.flush()` and related primary key generation, if the issue persists after upgrade.
Ensure `sqlalchemy-exasol` is installed: `pip install sqlalchemy-exasol`. If using a custom registration, verify the import path.