databricks-sqlalchemy
Databricks SQLAlchemy plugin for Python
Install
databricks-sqlalchemy on PyPI
pip
pip install databricks-sqlalchemyuv
uv add databricks-sqlalchemypoetry
poetry add databricks-sqlalchemyPackage facts
| License | Apache-2.0 (permissive) |
| Python support | supports the current Python release (<4.0.0,>=3.8.0) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 3 — databricks_sql_connector, pyarrow, sqlalchemy |
| Maintenance | actively maintained — 42 days since the last release |
| Last repo commit | |
| First released | |
| Popularity | one of the top 1,000 most-downloaded packages on PyPI (30-day window, as of 2026-08-13) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-13) |
Evidence: databricks_sqlalchemy-2.0.10-py3-none-any.whl
About databricks-sqlalchemy
from the package's own PyPI description — quoted content, verbatim
Databricks dialect for SQLALchemy 2.0
The Databricks dialect for SQLAlchemy serves as bridge between SQLAlchemy and the Databricks SQL Python driver. A working example demonstrating usage can be found in sqlalchemy_example.py.
Installation
To install the dialect and its dependencies:
pip install databricks-sqlalchemy
If you also plan to use alembic you can alternatively run:
pip install alembic
Connection String
Every SQLAlchemy application that connects to a database needs to use an Engine, which you can create by passing a connection string to create_engine. The connection string must include these components:
- Host
- HTTP Path for a compute resource
- API access token
- Initial catalog for the connection
- Initial schema for the connection
Note: Our dialect is built and tested on workspaces with Unity Catalog enabled. Support for the hive_metastore catalog is untested.
For example:
```python import os from sqlalchemy import create_engine
host = os.getenv("DATABRICKS_SERVER_HOSTNAME") http_path =...
Read as markdown · JSON record · Source repository · Homepage
AI interpretation — verify before relying
AI-generated interpretation of the package facts above; every digit, version, license, or vulnerability id it cites is grounded in the facts already shown on this page
A SQLAlchemy 2.0 dialect that bridges SQLAlchemy applications to Databricks SQL, enabling ORM and SQL expression language usage against Databricks warehouses and compute resources.
Low friction: pure Python wheel with only three runtime dependencies (databricks_sql_connector, pyarrow, sqlalchemy). Last release 42 days ago; repository is active and not archived.
Apache-2.0 permissive license allows commercial and private use with minimal restrictions; suitable for most production and proprietary projects.
Usage
from sqlalchemy import create_engine
import os
engine = create_engine(
f"databricks://token:{os.getenv('DATABRICKS_TOKEN')}@{os.getenv('DATABRICKS_SERVER_HOSTNAME')}"
f"?http_path={os.getenv('DATABRICKS_HTTP_PATH')}&catalog={os.getenv('DATABRICKS_CATALOG')}&schema={os.getenv('DATABRICKS_SCHEMA')}"
)
Requires Databricks workspace credentials (hostname, HTTP path, API token) and Unity Catalog enabled; hive_metastore support is untested.
Verdict: Active, well-maintained dialect for SQLAlchemy 2.0 on Databricks with low install friction and no known vulnerabilities. Apache-2.0 licensing is permissive. Suitable for production use; note that LargeBinary, PickleType, Enum, and CHECK constraints are not yet supported.
Needs verification
- Whether the dialect's type mappings and multi-row insert behavior match your application's data model requirements
- Performance characteristics and query compilation overhead compared to direct databricks_sql_connector usage
Similar packages
permissive · top 1,000 on PyPI
snowflake-sqlalchemypermissive · top 1,000 on PyPI
trinopermissive · top 1,000 on PyPI
SQLAlchemypermissive · top 100 on PyPI
pinotdbpermissive · top 1,000 on PyPI
sqlglotpermissive · top 1,000 on PyPI
sqlalchemy-bigquerypermissive · top 1,000 on PyPI
SQLAlchemy-Utilspermissive · top 1,000 on PyPI
databricks-sdkpermissive · top 1,000 on PyPI
clickhouse-connectpermissive · top 1,000 on PyPI