cancel
Showing results forย 
Search instead forย 
Did you mean:ย 
Data Engineering
Join discussions on data engineering best practices, architectures, and optimization strategies within the Databricks Community. Exchange insights and solutions with fellow data engineers.
cancel
Showing results forย 
Search instead forย 
Did you mean:ย 

`io.unitycatalog.client.model.TableType`, Unexpected value 'MATERIALIZED_VIEW

NUKSY
New Contributor II

I have been able to set up jdbc driver with databricks to connect to my unity catalog using local spark sessions. When i try to retrieve tables in my schema i get this error 

 An error occurred while calling o43.sql.
: io.unitycatalog.client.ApiException: com.fasterxml.jackson.databind.exc.ValueInstantiationException: Cannot construct instance of `io.unitycatalog.client.model.TableType`, problem: Unexpected value 'MATERIALIZED_VIEW'
 at [Source: (jdk.internal.net.http.ResponseSubscribers$HttpResponseInputStream); line: 1, column: 125] (through reference chain: io.unitycatalog.client.model.ListTablesResponse["tables"]->java.util.ArrayList[0]->io.unitycatalog.client.model.TableInfo["table_type"])

 

3 REPLIES 3

Renu_
New Contributor III

The issue could be because your JDBC driver doesnโ€™t recognize Unity Catalogโ€™s MATERIALIZED_VIEW table type, leading to this error. Try upgrading the Databricks JDBC driver which includes support for Unity Catalog features. You can also add UseNativeQuery=0 to your JDBC options to avoid native query parsing conflicts. And make sure your local Spark configuration aligns with Unity Catalog settings like access mode and permissions.

NUKSY
New Contributor II

Hi I am still getting this error. What version of Databricks jdbc driver does not cause this error

 

Jofes
New Contributor II

I am getting the same but for MANAGED_SHALLOW_CLONE tables:

An error occurred while calling o47.sql. : io.unitycatalog.client.ApiException: com.fasterxml.jackson.databind.exc.ValueInstantiationException: Cannot construct instance of io.unitycatalog.client.model.TableType, problem: Unexpected value 'MANAGED_SHALLOW_CLONE' at [Source: (jdk.internal.net.http.ResponseSubscribers$HttpResponseInputStream); line: 1, column: 90] (through reference chain: io.unitycatalog.client.model.TableInfo["table_type"])

 

Join Us as a Local Community Builder!

Passionate about hosting events and connecting people? Help us grow a vibrant local communityโ€”sign up today to get started!

Sign Up Now