sqlalchemy-trino was a Trino (f.k.a. PrestoSQL) dialect for SQLAlchemy. As of version 0.5.0, this project is officially deprecated. Its functionality has been merged into the upstream `trino-python-client` project, which now provides a built-in SQLAlchemy dialect. This library is no longer actively developed.
pip install sqlalchemy-trinoVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to connect to a Trino server using the `sqlalchemy-trino` dialect. It's crucial to note that this library is deprecated, and the recommended method is to use the `trino[sqlalchemy]` package directly, which provides the same dialect string (`trino://`).
Migrate your dependencies from `sqlalchemy-trino` to `trino[sqlalchemy]`. The connection string format remains `trino://...`.
Upgrade `sqlalchemy-trino` to 0.4.1 or newer to avoid direct conflicts, or ideally, migrate to using only `trino[sqlalchemy]` and remove `sqlalchemy-trino`.
Code that relied on lazy loading of `cursor.description` or custom handling of `TrinoResultProxy` will need adjustment. Custom metadata queries might need to be rewritten to use `information_schema`.
If your applications implicitly relied on `hive` as the default catalog without explicitly specifying it in the connection string, you will need to update your connection string to include `/hive` if that's still your desired catalog.
Install `sqlalchemy-trino` using `pip install sqlalchemy-trino`. However, as `sqlalchemy-trino` is deprecated, the recommended fix is to migrate to the `trino-python-client` by installing `pip install trino[sqlalchemy]` and using its dialect.
SQLAlchemy dialects are typically loaded implicitly via `create_engine` using the `trino://` scheme in the connection string; direct import of `sqlalchemy_trino` is generally not needed. Ensure `sqlalchemy-trino` (or `trino[sqlalchemy]`) is installed.
Migrate your codebase to use the SQLAlchemy dialect provided by `trino-python-client`. Install it with `pip install trino[sqlalchemy]` and ensure your `create_engine` calls use the `trino://` scheme, which `trino-python-client` now supports.
Verify that the schema specified exists within the Trino catalog you are connecting to and that your user has appropriate access. Update the connection string or modify your query to use a valid, existing schema.