apache/beam · error · UnsupportedOperationException
Unsupported Data Catalog entry
Error message
Unsupported Data Catalog entry: %s
What it means
DataCatalogTableProvider.toCalciteTable throws this when the Data Catalog Entry exists but no registered TableFactory can build a Beam Table from it. Only GCS fileset entries (and Pubsub via linkedResource) are supported; other entry types (e.g. BigTable, arbitrary linked resources) are rejected. The message includes the entry's linkedResource and whether it has a GCS fileset spec to aid diagnosis.
Solutions
- Verify the Data Catalog entry has a GCS fileset spec with exactly one gs:// file pattern, or a Pubsub topic linkedResource
- Create a new Data Catalog entry of the supported type instead of reusing an unrelated one
- Register a custom TableFactory that supports this entry type
- Print the entry's linkedResource and inspect its type in the Data Catalog console
Example fix
// before: entry has no gcsFilesetSpec -> factory returns empty
Table table = tableProvider.getTable("my_table");
// after: use an entry with a GCS fileset spec
// gcloud data-catalog entries update --linked-resource=... or create entry with file_patterns=['gs://bucket/path/*.json'] Defensive patterns
Strategy: validation
Validate before calling
com.google.cloud.datacatalog.v1beta1.Entry e = entry;
boolean supported = (e.hasGcsFilesetSpec() && e.getGcsFilesetSpec().getFilePatternsCount() == 1)
|| (e.getLinkedResource() != null && e.getLinkedResource().contains("/topics/"));
if (!supported) { throw new IllegalArgumentException("Unsupported DC entry: " + e.getName()); } Type guard
static boolean isSupportedEntry(Entry e) {
return e.hasGcsFilesetSpec() || (e.getLinkedResource() != null && e.getLinkedResource().contains("/topics/"));
} Try / catch
try {
Table t = provider.getTable(name);
} catch (UnsupportedOperationException ex) {
LOG.warn("Unsupported Data Catalog entry {}, falling back", name, ex);
return null; // or use an inline table definition
} Prevention
- Inspect linkedResource/type in the Data Catalog console before wiring the table
- Only register GCS fileset or Pubsub topic entries for Beam SQL
- Keep a smoke test that loads every catalog-backed table at startup
When it happens
Trigger: Calling loadTable on a Data Catalog entry whose type has no matching factory: entry.getGcsFilesetSpec() absent and linkedResource not a Pubsub topic, or a factory returns Optional.empty() from tableBuilder.
Common situations: Pointing Beam SQL at a Data Catalog entry created for another system (BigQuery dataset, custom template), or an entry where the GCS fileset spec was never filled in.
Understand the failure class
Background: UnsupportedOperationException and "is not supported" errors: when a library deliberately refuses a call — this error's family across 30 libraries.
Related errors
- Creating tables is not supported with DataCatalog table…
- Dropping tables is not supported with DataCatalog table…
- Loading all tables from DataCatalog is not supported
- Aggregator [ ] is not supported
- Array of arrays not supported in DataCatalog schemas
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/5d36c4141c0d218a.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/java/extensions/sql/datacatalog/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/datacatalog/DataCatalogTableProvider.java:201
return DataCatalogClient.create(builder.build());
} catch (IOException e) {
throw new RuntimeException("Error creating Data Catalog client", e);
}
}
private Table toCalciteTable(String tableName, Entry entry) {
if (entry.getSchema().getColumnsCount() == 0) {
throw new UnsupportedOperationException(
"Entry doesn't have a schema. Please attach a schema to '"
+ tableName
+ "' in Data Catalog: "
+ entry.toString());
}
Schema schema = SchemaUtils.fromDataCatalog(entry.getSchema());
Optional<Table.Builder> tableBuilder = tableFactory.tableBuilder(entry);
if (!tableBuilder.isPresent()) {
throw new UnsupportedOperationException(
String.format(
"Unsupported Data Catalog entry: %s",
MoreObjects.toStringHelper(entry)
.add("linkedResource", entry.getLinkedResource())
.add("hasGcsFilesetSpec", entry.hasGcsFilesetSpec())
.toString()));
}
return tableBuilder.get().schema(schema).name(tableName).build();
}
@Internal
public boolean setSchemaIfNotPresent(String resource, Schema schema) {
com.google.cloud.datacatalog.v1beta1.Schema dcSchema = SchemaUtils.toDataCatalog(schema);
Entry entry =
dataCatalog.lookupEntry(LookupEntryRequest.newBuilder().setSqlResource(resource).build());
if (entry.getSchema().getColumnsCount() == 0) {
dataCatalog.updateEntry(View on GitHub (pinned to 12126d8942)