skillfed

databricks-sqlalchemy

Databricks SQLAlchemy plugin for Python

databricks-sqlalchemy Permissive license Apache-2.0 Active 25 v2.0.10 released

Install

databricks-sqlalchemy on PyPI

pip

pip install databricks-sqlalchemy

uv

uv add databricks-sqlalchemy

poetry

poetry add databricks-sqlalchemy

Package 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

License :: OSI Approved :: Apache Software LicenseProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

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:

  1. Host
  2. HTTP Path for a compute resource
  3. API access token
  4. Initial catalog for the connection
  5. 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
databricks sqlalchemy dialectsqlalchemy databricks connectordatabricks sql python ormdatabricks warehouse sqlalchemydatabricks sql enginesqlalchemy databricks integrationdatabricks compute sqlalchemy

Similar packages