{"id":21099,"library":"databricks-dbapi","title":"databricks-dbapi","description":"A DBAPI 2.0 interface and SQLAlchemy dialect for Databricks interactive clusters. Current version 0.6.0, supports Python >=2.7 (excludes 3.0-3.4). Release cadence is irregular; latest releases: 0.4.0, 0.5.0, 0.6.0.","status":"active","version":"0.6.0","language":"python","source_language":"en","source_url":"https://github.com/crflynn/databricks-dbapi","tags":["databricks","dbapi","sqlalchemy","hiveserver2","thrift"],"install":[{"cmd":"pip install databricks-dbapi","lang":"bash","label":"pip install"}],"dependencies":[{"reason":"Required for Thrift-based HiveServer2 connection","package":"thrift","optional":true},{"reason":"Required for HTTP-based connection","package":"requests","optional":true},{"reason":"Required for SQLAlchemy dialect support","package":"sqlalchemy","optional":true}],"imports":[{"wrong":"from databricks_dbapi import Connection","symbol":"Connection","correct":"from databricks_dbapi import Connection"}],"quickstart":{"code":"from databricks_dbapi import Connection\n\nconn = Connection(\n    server_hostname='your-databricks-instance.cloud.databricks.com',\n    http_path='/sql/1.0/warehouses/your-warehouse-id',\n    access_token=os.environ.get('DATABRICKS_TOKEN', '')\n)\ncursor = conn.cursor()\ncursor.execute('SELECT current_timestamp')\nprint(cursor.fetchall())","lang":"python","description":"Connect to Databricks interactive cluster using HTTP (default) with personal access token."},"warnings":[{"fix":"Use Python 3.6+ or pin to databricks-dbapi==0.4.0.","message":"Version 0.5.0 removed support for Python 3.5 and earlier; ensure Python 3.6+.","severity":"breaking","affected_versions":">=0.5.0"},{"fix":"Connection(..., transport='thrift')","message":"The default connection uses HTTP (REST API), but if you need HiveServer2 Thrift, you must explicitly specify transport='thrift'.","severity":"gotcha","affected_versions":"all"},{"fix":"Use 'databricks+http://' or 'databricks+thrift://' explicitly.","message":"The SQLAlchemy dialect uses 'databricks+http://' or 'databricks+thrift://'; the plain 'databricks://' prefix may be removed in future.","severity":"deprecated","affected_versions":"all"},{"fix":"Double-check server_hostname (e.g., 'dbc-...cloud.databricks.com') and http_path (from SQL Warehouse settings).","message":"Timeout errors often occur if server_hostname or http_path are incorrect; they are not validated until a query is run.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"search_vec":"'-3.4':23 '0.4.0':30 '0.5.0':31 '0.6.0':17,32 '2.0':6 '2.7':20 '3.0':22 'cadenc':25 'cluster':14 'current':15 'databrick':2,12,33 'databricks-dbapi':1 'dbapi':3,5,34 'dialect':10 'exclud':21 'hiveserver2':36 'interact':13 'interfac':7 'irregular':27 'latest':28 'python':19 'releas':24,29 'sqlalchemi':9,35 'support':18 'thrift':37 'version':16","created_at":"2026-04-27T16:58:05.264455+00:00","updated_at":"2026-04-27T16:58:05.264455+00:00","problems":{"verify_error":"Traceback (most recent call last):\n  File \"<string>\", line 1, in <module>\nImportError: cannot import name 'Connection' from 'databricks_dbapi' (/tmp/tmpvfaxeavi/venv/lib/python3.12/site-packages/databricks_dbapi/__init__.py)"},"ecosystem":"pypi","meta_description":null,"install_score":null,"quickstart_score":null,"quickstart_tag":null,"pypi_latest":"0.6.0","cli_name":"","cli_version":null,"type":"library","homepage":null,"github":"https://github.com/crflynn/databricks-dbapi","docs":"https://github.com/crflynn/databricks-dbapi","changelog":null,"pypi":"https://pypi.org/project/databricks-dbapi/","npm":null,"openapi_spec":null,"status_page":null,"smithery":null,"categories":["database","aws"],"base_url":null,"auth_type":null,"provenance":{"verified_status":"import_fail","verified_at":"2026-07-03","last_verified":"2026-07-03","next_check":"2026-07-10","install_tag":null}}