--- id: databricks-dbapi version: "0.6.0" license: MIT license_treatment: permissive maintenance: abandoned --- # databricks-dbapi — A DBAPI 2.0 interface and SQLAlchemy dialect for Databricks interactive clusters. License: permissive · Maintenance: abandoned · Downloads: 147.5K/mo ## What it is and what it does databricks-dbapi is a thin wrapper around pyhive and pyodbc that implements the Python DBAPI 2.0 standard for connecting to Databricks clusters. It lets you execute SQL queries against Databricks Workspace and SQL Analytics clusters using either a Thrift-based connection (via pyhive) or an ODBC connection (via pyodbc with the Simba driver). The package also registers SQLAlchemy dialects so you can use Databricks as a backend with SQLAlchemy's ORM and query builder. The main use case is integrating Databricks query execution into Python applications that expect a standard DBAPI interface or SQLAlchemy support. It handles authentication via Databricks tokens and cluster endpoints, and supports both synchronous queries and asynchronous polling for long-running operations. However, the package has been abandoned since January 2022 and receives no maintenance, so compatibility with recent Databricks API changes or authentication schemes is uncertain. Use it for: - Execute SQL queries against Databricks clusters from Python scripts using standard DBAPI cursor methods. - Integrate Databricks as a SQLAlchemy backend for ORM-based data access in Python applications. - Run asynchronous queries on Databricks clusters and poll for results without blocking. - Connect to SQL Analytics clusters via ODBC when pyhive is not suitable or available. ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides a DBAPI 2.0 connection interface and SQLAlchemy dialects to query Databricks Workspace and SQL Analytics clusters using either pyhive or pyodbc backends. No, not recommended for new projects. The package is abandoned (last release November 2021, last commit January 2022) and receives no maintenance. Databricks likely provides official or better-maintained connectors; you should check the current Databricks documentation for supported Python drivers before choosing this package. If you have legacy code already using it, it may still work, but migration to an actively maintained alternative is advisable. ## Install pip install databricks-dbapi uv add databricks-dbapi poetry add databricks-dbapi ## Installing databricks-dbapi Before you install: Installation is low-friction as a pure-Python wheel, but the package is abandoned as of January 2022 with no recent maintenance. You must explicitly install at least one extra (hive or odbc), and the odbc path requires the separate Simba ODBC driver to be installed on your system. License in practice: Licensed under MIT (permissive), so you can use, modify, and distribute it freely with minimal restrictions. Quickstart: pip install databricks-dbapi[hive] from databricks_dbapi import hive import os connection = hive.connect( host=os.environ["DATABRICKS_HOST"], http_path=os.environ["DATABRICKS_HTTP_PATH"], token=os.environ["DATABRICKS_TOKEN"] ) cursor = connection.cursor() cursor.execute("SELECT * FROM some_table LIMIT 100") print(cursor.fetchone()) For odbc mode, the Simba ODBC driver must be installed separately on your system; for hive mode, pyhive and thrift are required as optional dependencies. Verify before relying: - Whether pyhive and pyodbc are declared as optional dependencies in the package metadata (not shown in fact sheet). - Current compatibility with modern Databricks APIs and authentication methods beyond token-based auth. - Whether the abandoned status affects functionality with current Databricks cluster versions. ## Package facts - License: MIT (permissive) - Python support: supports_current - Install friction: low - Maintenance: abandoned - Downloads: 147.5K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags databricks sql connection, dbapi databricks, sqlalchemy databricks dialect, databricks cluster query, pyhive odbc wrapper, databricks hive connection, databricks analytics driver, abandoned, dbapi-connector, sqlalchemy-dialect [View on SkillFed](https://skillfed.io/packages/databricks-dbapi) · [View on PyPI](https://pypi.org/project/databricks-dbapi/)