{"record":{"id":"5d36c4141c0d218a","repo":"apache/beam","slug":"unsupported-data-catalog-entry-s","errorCode":null,"errorMessage":"Unsupported Data Catalog entry: %s","messagePattern":"Unsupported Data Catalog entry: (.+?)","errorType":"exception","errorClass":"UnsupportedOperationException","httpStatus":null,"severity":"error","filePath":"sdks/java/extensions/sql/datacatalog/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/datacatalog/DataCatalogTableProvider.java","lineNumber":201,"sourceCode":"      return DataCatalogClient.create(builder.build());\n    } catch (IOException e) {\n      throw new RuntimeException(\"Error creating Data Catalog client\", e);\n    }\n  }\n\n  private Table toCalciteTable(String tableName, Entry entry) {\n    if (entry.getSchema().getColumnsCount() == 0) {\n      throw new UnsupportedOperationException(\n          \"Entry doesn't have a schema. Please attach a schema to '\"\n              + tableName\n              + \"' in Data Catalog: \"\n              + entry.toString());\n    }\n    Schema schema = SchemaUtils.fromDataCatalog(entry.getSchema());\n\n    Optional<Table.Builder> tableBuilder = tableFactory.tableBuilder(entry);\n    if (!tableBuilder.isPresent()) {\n      throw new UnsupportedOperationException(\n          String.format(\n              \"Unsupported Data Catalog entry: %s\",\n              MoreObjects.toStringHelper(entry)\n                  .add(\"linkedResource\", entry.getLinkedResource())\n                  .add(\"hasGcsFilesetSpec\", entry.hasGcsFilesetSpec())\n                  .toString()));\n    }\n\n    return tableBuilder.get().schema(schema).name(tableName).build();\n  }\n\n  @Internal\n  public boolean setSchemaIfNotPresent(String resource, Schema schema) {\n    com.google.cloud.datacatalog.v1beta1.Schema dcSchema = SchemaUtils.toDataCatalog(schema);\n    Entry entry =\n        dataCatalog.lookupEntry(LookupEntryRequest.newBuilder().setSqlResource(resource).build());\n    if (entry.getSchema().getColumnsCount() == 0) {\n      dataCatalog.updateEntry(","sourceCodeStart":183,"sourceCodeEnd":219,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/extensions/sql/datacatalog/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/datacatalog/DataCatalogTableProvider.java#L183-L219","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","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"],"exampleFix":"// before: entry has no gcsFilesetSpec -> factory returns empty\nTable table = tableProvider.getTable(\"my_table\");\n// after: use an entry with a GCS fileset spec\n// gcloud data-catalog entries update --linked-resource=... or create entry with file_patterns=['gs://bucket/path/*.json']","handlingStrategy":"validation","validationCode":"com.google.cloud.datacatalog.v1beta1.Entry e = entry;\nboolean supported = (e.hasGcsFilesetSpec() && e.getGcsFilesetSpec().getFilePatternsCount() == 1)\n    || (e.getLinkedResource() != null && e.getLinkedResource().contains(\"/topics/\"));\nif (!supported) { throw new IllegalArgumentException(\"Unsupported DC entry: \" + e.getName()); }","typeGuard":"static boolean isSupportedEntry(Entry e) {\n  return e.hasGcsFilesetSpec() || (e.getLinkedResource() != null && e.getLinkedResource().contains(\"/topics/\"));\n}","tryCatchPattern":"try {\n  Table t = provider.getTable(name);\n} catch (UnsupportedOperationException ex) {\n  LOG.warn(\"Unsupported Data Catalog entry {}, falling back\", name, ex);\n  return null; // or use an inline table definition\n}","preventionTips":["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"],"tags":["datacatalog","sql","unsupported-entry"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}