ManojkMohan
Honored Contributor II

Root Cause of Error

Different Metastores

  • Your free demo workspace uses the Hive Metastore by default.
  • The paid workspace uses Unity Catalog.

Corrective Solution

Connect via Databricks SQL Warehouse

Use the JDBC endpoint from a SQL Warehouse (not the legacy Hive thrift server).

Example URL:

jdbc:databricks://<workspace-host>:443/default;transportMode=http;ssl=1;httpPath=/sql/1.0/warehouses/<warehouse-id>;AuthMech=3;UID=token;PWD=<personal-access-token>


Use the Official Databricks JDBC Driver

Download from Databricks docs.

Don’t use generic Hive/Spark JDBC drivers.

Verify Unity Catalog Permissions

The user running JDBC must have:

GRANT USE CATALOG ON CATALOG <catalog> TO `<user>`;
GRANT USE SCHEMA ON SCHEMA <catalog>.<schema> TO `<user>`;

Without these, getSchemas() will fail even on the right endpoint.

Test with Basic Queries

Run:

SHOW CATALOGS;
SHOW SCHEMAS IN <catalog>;
SHOW TABLES IN <catalog>.<schema>;


If these succeed, JDBC + Unity Catalog is configured correctly.

Let me know if the above works, and if you find this useful pls mark as an accepted solution