Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Error Messages with Unity Catalog

Open
#263 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
python, sqlalchemy
Domain
databases

Research direction

Reproduce the two SQLAlchemy create_engine and execute cases against Unity Catalog-enabled and non-enabled clusters, comparing the connector errors shown in the report. Trace where the Databricks ServerOperationError is surfaced and verify that a non-enabled cluster produces the clearer UC_NOT_ENABLED message instead of the catalog plugin error.

Written by the indexing model from the issue text.

Description

bug

On older versions of the connector (version 2.5.2) and connecting to a cluster where unity catalog is not enabled, it would give us the first failure message. However, after updating to the connector (version 2.9.3) and connecting to unity catalog enabled cluster, it's giving us a different error message, which doesn't help figure out what the issue is.

from sqlalchemy import create_engine

# Unity Catalog enabled
uc_eng = create_engine(f"databricks://{CONNECTION_STRING}?catalog=prod", connect_args={'http_path': f'sql/protocolv1/o/{WORKSPACE_ID}/{UC_CLUSTER_ID}'})
uc_eng.execute(f"select * from {TABLE_NAME} limit 1").fetchall()  # works

# NOT Unity Catalog ENABLED 
non_uc_eng = create_engine(f"databricks://{CONNECTION_STRING}?catalog=prod", connect_args={'http_path': f'sql/protocolv1/o/{WORKSPACE_ID}/{NON_UC_CLUSTER_ID}'})
non_uc_eng.execute("select * from {TABLE_NAME} limit 1").fetchall(). # fails 


Failure message:
DatabaseError: (databricks.sql.exc.ServerOperationError) Catalog 'prod' plugin class not found: spark.sql.catalog.prod is not defined
[SQL: select * from prod.{TABLE_NAME} limit 1]
(Background on this error at: http://sqlalche.me/e/13/4xp6)
instead of former:
sqlalchemy.exc.DatabaseError: (databricks.sql.exc.ServerOperationError) [UC_NOT_ENABLED] Unity Catalog is not enabled on this cluster.
Dominant language
Python
Stars
233
Forks
152
Avg merge
21h 5m
Merged PRs (30d)
10

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from databricks/databricks-sql-python

All issues in databricks/databricks-sql-python

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.