Repository navigation
Closed as not planned
Closed as not planned
Copy link
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.
Description
Recently, while using the library, a new error have appeared
j.l.IllegalArgumentException: Format METASTORE is not supported
at c.g.c.b.TableDefinition.fromPb(TableDefinition.java:174)
That error happens when trying to access a bigquery table that doesn't belong to one of the expected formats
TableDefinition.java#L174)
default: throw new IllegalArgumentException("Format " + tablePb.getType() + " is not supported");
Is this something that it is expected to be supported soon?
Environment details
- Specify the API at the beginning of the title: BigQuery
- OS type and version: Irrelevant
- Java version: All java versions
- version(s): all versions
Steps to reproduce
- Run the following code to get the list of bigquery tables and their metadata.
Code example
private val client: BigQuery = BigQueryOptions.newBuilder.setProjectId(projectId).build().getService
client.listDatasets(projectId).iterateAll().asScala.map(_.getDatasetId)Stack trace
j.l.IllegalArgumentException: Format METASTORE is not supported
at c.g.c.b.TableDefinition.fromPb(TableDefinition.java:174)
at c.g.c.b.TableInfo$BuilderImpl.<init>(TableInfo.java:253)
at c.g.c.bigquery.Table.fromPb(Table.java:690)
at c.g.c.b.BigQueryImpl$22.apply(BigQueryImpl.java:966)
at c.g.c.b.BigQueryImpl$22.apply(BigQueryImpl.java:963)
at c.g.c.c.Iterators$6.transform(Iterators.java:829)
at c.g.c.c.TransformedIterator.next(TransformedIterator.java:52)
at c.g.c.PageImpl$PageIterator.computeNext(PageImpl.java:72)
at c.g.c.c.AbstractIterator.tryToComputeNext(AbstractIterator.java:145)
at c.g.c.c.AbstractIterator.hasNext(AbstractIterator.java:140)
at s.c.c.JavaCollectionWrappers$JIteratorWrapper.hasNext(JavaCollectionWrappers.scala:46)
at s.c.StrictOptimizedIterableOps.map(StrictOptimizedIterableOps.scala:99)
at s.c.StrictOptimizedIterableOps.map$(StrictOptimizedIterableOps.scala:87)
at s.c.c.JavaCollectionWrappers$JIterableWrapper.map(JavaCollectionWrappers.scala:83)
External references such as API reference guides
This seems to be related to the new Iceberg formats
https://medium.com/@cesar.cordoba/iceberg-format-a-short-introduction-6cca39e48ac
https://cloud.google.com/bigquery/docs/iceberg-tables
Any additional information below
Checking the information from the command line over that dataset
bq ls --format=json --project_id="project_id" "dataset"
We can verify several tables have the "METASTORE" format.
{"kind":"bigquery#table","id":"project_id:dataset.mytable","tableReference":{"projectId":"project_id","datasetId":"dataset","tableId":"mytable"},"type":"METASTORE","creationTime":"1711215011000"},
Checking that table:
bq show --format=json "project_id:dataset.mytable"
"type":"METASTORE","externalDataConfiguration":{"sourceUris":["s3://edited.metadata.json"],"sourceFormat":"ICEBERG"
Metadata
Metadata
Assignees
Labels
api: bigqueryIssues related to the BigQuery API.Issues related to the BigQuery API.priority: p3Desirable enhancement or fix. May not be included in next release.Desirable enhancement or fix. May not be included in next release.
Activity
jinseopkim0 commentedon Oct 22, 2025
If you have a support contract with Google, please create an issue in the support console instead of filing on GitHub. This will ensure a timely response.
[-]BigQuery: METASTORE format not supported. [/-][+][java-bigquery] BigQuery: METASTORE format not supported. [/+]jjmew commentedon Nov 18, 2026
Closing this issue due to inactivity (no activity in over two years). If it's still relevant, please feel free to reopen it or comment with any additional information, such as the library version and steps to reproduce. Thank you!
vejeta commentedon Nov 19, 2026
Still happening on 2.77.0 (and 2.43.0). My original snippet was wrong, sorry: listDatasets never touches tables. It's listTables, getTable and Dataset.list:
BigLake Iceberg tables come back as
"type": "METASTORE"and fromPb throws on any type it doesn't know. Since that happens inside the page iterator, one Iceberg table breakslistTables().iterateAll()for the whole dataset. The Python client handles it fine.I sent a fix with tests in #15076: adds
Type.METASTORE(parsed asExternalTableDefinition) and falls back instead of throwing on unknown types. Hope that approach is ok, but feel free to close it if you'd rather fix it differently or not at all. Could you reopen this one?