cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Warehousing & Analytics
Engage in discussions on data warehousing, analytics, and BI solutions within the Databricks Community. Share insights, tips, and best practices for leveraging data for informed decision-making.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

Databricks workspace default catalog not working anymore with JDBC driver

loic
Contributor

Hello,

We recently detected an issue in our product deployment with terraform.
At some point, we have some java code that creates a schema in "hive_metastore" catalog.
Since "hive_metastore" catalog is the default one, there should not be any need to specify it.
It is the implementation that has been done in the java code (catalog is not specified).

Till recently, this code was working properly.

But now, the same code complains about empty catalog.
If I explicitly set the catalog name in the java code, then the code works fine again.

The problem is that this code is in production. 
Does this new behavior is expected? Or is it a regression at some point in Databricks?

Regards,
Loรฏc

2 REPLIES 2

loic
Contributor

The exact error reported by Databricks is:

[RequestId=f27975cd-7589-4463-8c03-6015893ee133 ErrorClass=INVALID_PARAMETER_VALUE] Invalid input: RPC CreateSchema Field managedcatalog.SchemaInfo.catalog_name: name "" is not a valid name

 

mark_ott
Databricks Employee
Databricks Employee

This new behaviorโ€”where explicitly specifying the catalog name is now required and the absence of the catalog triggers an errorโ€”suggests a change or stricter validation in Databricks' handling of schema creation, especially when interacting with the "hive_metastore" catalog via RPC or Java API. Previously, omitting the catalog assumed the default as "hive_metastore," but now Databricks expects this parameter to be provided explicitly.

Expected Behavior or Regression?

Recent updates to Databricks have increased the strictness around catalog and schema management APIs, enforcing explicit specification of parameters that were previously defaulted or inferred. This means that not providing the catalog nameโ€”resulting in an empty stringโ€”now leads to an error like the one you encountered:

text
Invalid input: RPC CreateSchema Field managedcatalog.SchemaInfo.catalog_name: name "" is not a valid name

Such changes are typically part of efforts to standardize and future-proof the platform, which is adding native catalog support beyond "hive_metastore." As a result, ambiguity about the catalog is being resolved by enforcing explicit naming.

Actions and Recommendations

  • Immediate solution: Continue specifying the "hive_metastore" catalog in the Java code as a workaround. This aligns with current platform requirements.

  • Long-term: Review Databricks release notes and changelogs for platform, API, or schema management changes related to catalog handling. Sometimes these changes are documented as breaking changes or enhancements affecting production deployments.

  • Best practice: Always specify catalog explicitly when programmatically managing schemasโ€”especially in multi-catalog, multi-workspace, or newer platform versions.

Summary Table

Previous Behavior Current Behavior Recommended Fix
Catalog defaulted to "hive_metastore" Explicit catalog required Specify "hive_metastore" in code
 
 

This change is likely expected behavior rather than a regression, resulting from evolving API and platform standards in Databricks. If the code must remain unchanged due to deployment constraints, consider reaching out to Databricks support and review recent documentation for configuration flags or backward compatibility options.

If further clarification is needed, consult recent Databricks documentation or contact Databricks support with the exact error and API usage pattern.