{"record":{"id":"a1090f030eb51223","repo":"apache/beam","slug":"tableprovider-is-null","errorCode":null,"errorMessage":"TableProvider is null","messagePattern":"TableProvider is null","errorType":"exception","errorClass":"RuntimeException","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":131,"sourceCode":"  @Override\n  public Table getTableByFullName(TableName fullTableName) {\n\n    ImmutableList<String> allNameParts =\n        ImmutableList.<String>builder()\n            .addAll(fullTableName.getPath())\n            .add(fullTableName.getTableName())\n            .build();\n\n    String fullEscapedTableName = ZetaSqlIdUtils.escapeAndJoin(allNameParts);\n\n    return loadTable(fullEscapedTableName);\n  }\n\n  @Override\n  public BeamSqlTable buildBeamSqlTable(Table table) {\n    TableProvider tableProvider = DELEGATE_PROVIDERS.get(table.getType());\n    if (tableProvider == null) {\n      throw new RuntimeException(\"TableProvider is null\");\n    }\n    return tableProvider.buildBeamSqlTable(table);\n  }\n\n  private Table loadTable(String tableName) {\n    if (!tableCache.containsKey(tableName)) {\n      tableCache.put(tableName, loadTableFromDC(tableName));\n    }\n\n    return tableCache.get(tableName);\n  }\n\n  private Table loadTableFromDC(String tableName) {\n    try {\n      return toCalciteTable(\n          tableName,\n          dataCatalog.lookupEntry(\n              LookupEntryRequest.newBuilder().setSqlResource(tableName).build()));","sourceCodeStart":113,"sourceCodeEnd":149,"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#L113-L149","documentation":"DataCatalogTableProvider delegates to other providers (e.g. bigquery, pubsub) based on the table's type field. If a DataCatalog entry's type maps to no registered delegate provider, buildBeamSqlTable throws a RuntimeException(\"TableProvider is null\") rather than silently failing. It indicates a table type that this Beam installation cannot materialize.","triggerScenarios":"A DataCatalog entry whose table.getType() is not one of the keys in DELEGATE_PROVIDERS — e.g. custom/unrecognized types, entries of a service Beam has no SQL provider for, or a Beam version missing a provider that the catalog entry expects.","commonSituations":"Querying catalog entries registered for unsupported systems; version skew where the entry type (e.g. a newer provider type) predates the Beam release; typos in type registration.","solutions":["Check table.getType() of the entry and ensure a matching SQL provider (e.g. bigquery) is on the classpath and registered in DELEGATE_PROVIDERS.","Fix the DataCatalog entry so its type corresponds to a supported Beam SQL table type.","Upgrade Beam to a version whose datacatalog provider registers the delegate for that type."],"exampleFix":"// before\n// entry type: 'unsupported.system' -> DELEGATE_PROVIDERS.get(...) == null\n\n// after\n// re-tag the entry as a BigQuery table so getType() == \"bigquery\"\n// and ensure beam-sdks-java-extensions-sql-bigquery is on the classpath","handlingStrategy":"validation","validationCode":"String type = table.getType();\nSet<String> supported = Set.of(\"bigquery\", \"pubsub\", \"kafka\", ...);\nif (!supported.contains(type)) {\n  throw new IllegalArgumentException(\"No delegate SQL provider for type: \" + type);\n}","typeGuard":null,"tryCatchPattern":"try {\n  provider.buildBeamSqlTable(table);\n} catch (RuntimeException e) {\n  if (e.getMessage().contains(\"TableProvider is null\")) {\n    // handle unsupported table type\n  }\n}","preventionTips":["Verify the entry's type maps to a provider shipped with your Beam version","Keep SQL provider dependencies (e.g. beam-sql-bigquery) on the classpath","Re-tag DataCatalog entries whose types were registered by other tools"],"tags":["apache-beam","datacatalog","java","null"],"backgroundTag":"resource-not-found","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}