unitycatalog / unitycatalog/unitycatalog

BUG: problem: Unexpected value 'VIEW'

Open
#657 3 comments 6 reactions 1 assignee View on GitHub

@roeap is already working on this.

Since Mar 18, 2025.

bug
Dominant language
Java
Stars
3.5k
Forks
672
Avg merge
6d 16h
Merged PRs (30d)
30

Description

Describe the bug

Error when listing a (Databricks managed UC Catalog) schema that contains a VIEW.

To Reproduce

Steps to reproduce the behavior:

  1. git pull
  2. bin/uc table list --catalog douglas_moore --schema demo --server https://adb-984752964297111.11.azuredatabricks.net --auth_token $TOKEN
Exception in thread "main" java.lang.RuntimeException: io.unitycatalog.client.ApiException: com.fasterxml.jackson.databind.exc.ValueInstantiationException: Cannot construct instance of `io.unitycatalog.client.model.TableType`, problem: Unexpected value 'VIEW'

Expected behavior
Listing with Views, Materialized views etc. or fail silently or ** unsupported object type **

System [please complete the following information]:

Server: Azure Databricks
Client: Mac OS
Additional context

Stack traceback:

Exception in thread "main" java.lang.RuntimeException: io.unitycatalog.client.ApiException: com.fasterxml.jackson.databind.exc.ValueInstantiationException: Cannot construct instance of `io.unitycatalog.client.model.TableType`, problem: Unexpected value 'VIEW'
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 96] (through reference chain: io.unitycatalog.client.model.ListTablesResponse["tables"]->java.util.ArrayList[0]->io.unitycatalog.client.model.TableInfo["table_type"])
	at io.unitycatalog.cli.UnityCatalogCli.main(UnityCatalogCli.java:98)
Caused by: io.unitycatalog.client.ApiException: com.fasterxml.jackson.databind.exc.ValueInstantiationException: Cannot construct instance of `io.unitycatalog.client.model.TableType`, problem: Unexpected value 'VIEW'
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 96] (through reference chain: io.unitycatalog.client.model.ListTablesResponse["tables"]->java.util.ArrayList[0]->io.unitycatalog.client.model.TableInfo["table_type"])
	at io.unitycatalog.client.api.TablesApi.listTablesWithHttpInfo(TablesApi.java:352)
	at io.unitycatalog.client.api.TablesApi.listTables(TablesApi.java:317)
	at io.unitycatalog.cli.TableCli.listTables(TableCli.java:124)
	at io.unitycatalog.cli.TableCli.handle(TableCli.java:45)
	at io.unitycatalog.cli.UnityCatalogCli.main(UnityCatalogCli.java:82)
Caused by: com.fasterxml.jackson.databind.exc.ValueInstantiationException: Cannot construct instance of `io.unitycatalog.client.model.TableType`, problem: Unexpected value 'VIEW'
 at [Source: REDACTED (`StreamReadFeature.INCLUDE_SOURCE_IN_LOCATION` disabled); line: 1, column: 96] (through reference chain: io.unitycatalog.client.model.ListTablesResponse["tables"]->java.util.ArrayList[0]->io.unitycatalog.client.model.TableInfo["table_type"])
	at com.fasterxml.jackson.databind.exc.ValueInstantiationException.from(ValueInstantiationException.java:47)
	at com.fasterxml.jackson.databind.DeserializationContext.instantiationException(DeserializationContext.java:2014)
	at com.fasterxml.jackson.databind.DeserializationContext.handleInstantiationProblem(DeserializationContext.java:1426)
	at com.fasterxml.jackson.databind.deser.std.FactoryBasedEnumDeserializer.deserialize(FactoryBasedEnumDeserializer.java:205)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:310)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer._deserializeFromArray(CollectionDeserializer.java:361)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:246)
	at com.fasterxml.jackson.databind.deser.std.CollectionDeserializer.deserialize(CollectionDeserializer.java:30)
	at com.fasterxml.jackson.databind.deser.impl.MethodProperty.deserializeAndSet(MethodProperty.java:129)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.vanillaDeserialize(BeanDeserializer.java:310)
	at com.fasterxml.jackson.databind.deser.BeanDeserializer.deserialize(BeanDeserializer.java:177)
	at com.fasterxml.jackson.databind.deser.DefaultDeserializationContext.readRootValue(DefaultDeserializationContext.java:342)
	at com.fasterxml.jackson.databind.ObjectMapper._readMapAndClose(ObjectMapper.java:4905)
	at com.fasterxml.jackson.databind.ObjectMapper.readValue(ObjectMapper.java:3893)
	at io.unitycatalog.client.api.TablesApi.listTablesWithHttpInfo(TablesApi.java:347)
	... 4 more
Caused by: java.lang.IllegalArgumentException: Unexpected value 'VIEW'
	at io.unitycatalog.client.model.TableType.fromValue(TableType.java:60)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
	at java.base/java.lang.reflect.Method.invoke(Method.java:566)
	at com.fasterxml.jackson.databind.introspect.AnnotatedMethod.callOnWith(AnnotatedMethod.java:118)
	at com.fasterxml.jackson.databind.deser.std.FactoryBasedEnumDeserializer.deserialize(FactoryBasedEnumDeserializer.java:194)
	... 17 more

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.