apache/beam · error · UnsupportedOperationException
Loading all tables from DataCatalog is not supported
Error message
Loading all tables from DataCatalog is not supported
What it means
getTables() must enumerate every table the provider serves, but DataCatalog has no cheap bulk listing that maps to this contract, so the provider throws UnsupportedOperationException. Only point lookups via getTable(tableName) are supported.
Source
Thrown at sdks/java/extensions/sql/datacatalog/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/datacatalog/DataCatalogTableProvider.java:105
public String getTableType() {
return "google.cloud.datacatalog";
}
@Override
public void createTable(Table table) {
throw new UnsupportedOperationException(
"Creating tables is not supported with DataCatalog table provider.");
}
@Override
public void dropTable(String tableName) {
throw new UnsupportedOperationException(
"Dropping tables is not supported with DataCatalog table provider");
}
@Override
public Map<String, Table> getTables() {
throw new UnsupportedOperationException("Loading all tables from DataCatalog is not supported");
}
@Override
public @Nullable Table getTable(String tableName) {
return loadTable(tableName);
}
@Override
public Table getTableByFullName(TableName fullTableName) {
ImmutableList<String> allNameParts =
ImmutableList.<String>builder()
.addAll(fullTableName.getPath())
.add(fullTableName.getTableName())
.build();
String fullEscapedTableName = ZetaSqlIdUtils.escapeAndJoin(allNameParts);
View on GitHub (pinned to 12126d8942)
Solutions
- Use getTable(name) / the SQL `SELECT` against a known table name instead of enumerating.
- List DataCatalog entries with the DataCatalog search/lookup APIs directly and look them up individually.
- Avoid operations that require full-table enumeration against this provider.
Example fix
// before
Map<String, Table> all = provider.getTables(); // throws
// after
Table t = provider.getTable("project:dataset.table");
if (t != null) { /* use t */ } Defensive patterns
Strategy: try-catch
Validate before calling
if ("google.cloud.datacatalog".equals(provider.getTableType()) && needFullListing) {
throw new IllegalStateException("getTables unsupported; use getTable(name)");
} Try / catch
try {
provider.getTables();
} catch (UnsupportedOperationException e) {
// enumerate via DataCatalog search API or use known table names
} Prevention
- Never rely on full table enumeration for this provider
- Use getTable(name) with known names
- List entries with DataCatalog search/lookup APIs outside Beam if enumeration is needed
When it happens
Trigger: Calling provider.getTables() directly, or operations that need the full table list: metadata queries against the catalog, Calcite schema enumeration, or tools listing all available Beam SQL tables.
Common situations: Schema-browsing tools, dashboards that list tables, or test harnesses that call getTables() to validate provider contents.
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 prov
- Dropping tables is not supported with DataCatalog table prov
- Unsupported format for BigQuery table path: '{linkedResource
- TableProvider is null
- Could not resolve table in Data Catalog: {tableName}
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/cb462666f2c654f7.
Report an issue: GitHub.