{"record":{"id":"6d0d128928b8915b","repo":"apache/beam","slug":"invalidtableexception-e-getmessage","errorCode":null,"errorMessage":"InvalidTableException(e.getMessage())","messagePattern":"InvalidTableException\\(e\\.getMessage\\(\\)\\)","errorType":"exception","errorClass":"InvalidTableException","httpStatus":null,"severity":"error","filePath":"sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/SchemaIOTableProviderWrapper.java","lineNumber":85,"sourceCode":"  @Override\n  public BeamSqlTable buildBeamSqlTable(Table tableDefinition) {\n    ObjectNode tableProperties = tableDefinition.getProperties();\n\n    try {\n      RowJson.RowJsonDeserializer deserializer =\n          RowJson.RowJsonDeserializer.forSchema(getSchemaIOProvider().configurationSchema())\n              .withNullBehavior(RowJson.RowJsonDeserializer.NullBehavior.ACCEPT_MISSING_OR_NULL);\n\n      Row configurationRow =\n          newObjectMapperWith(deserializer).readValue(tableProperties.toString(), Row.class);\n\n      SchemaIO schemaIO =\n          getSchemaIOProvider()\n              .from(tableDefinition.getLocation(), configurationRow, tableDefinition.getSchema());\n\n      return new SchemaIOTableWrapper(schemaIO);\n    } catch (InvalidConfigurationException | InvalidSchemaException e) {\n      throw new InvalidTableException(e.getMessage());\n    } catch (JsonProcessingException e) {\n      throw new AssertionError(\"Failed to re-parse TBLPROPERTIES JSON \" + tableProperties);\n    }\n  }\n\n  protected BeamTableStatistics getTableStatistics(PipelineOptions options, SchemaIO schemaIO) {\n    if (isBounded().equals(PCollection.IsBounded.BOUNDED)) {\n      return BeamTableStatistics.BOUNDED_UNKNOWN;\n    }\n    return BeamTableStatistics.UNBOUNDED_UNKNOWN;\n  }\n\n  private PCollection.IsBounded isBounded() {\n    return getSchemaIOProvider().isBounded();\n  }\n\n  /** A generalized {@link BeamSqlTable} for IOs to create IO readers and writers. */\n  private class SchemaIOTableWrapper extends BaseBeamTable {","sourceCodeStart":67,"sourceCodeEnd":103,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/SchemaIOTableProviderWrapper.java#L67-L103","documentation":"In SchemaIOTableProviderWrapper.buildBeamSqlTable, the TBLPROPERTIES JSON is deserialized into a Row matching the SchemaIO provider's configuration schema. When Jackson cannot map the properties onto that schema (unknown fields, wrong types, missing required fields), the thrown JsonProcessingException/InvalidFormatException is rethrown as InvalidTableException with the underlying message — the table definition's properties don't conform to the provider's expected configuration.","triggerScenarios":"Thrown at sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/SchemaIOTableProviderWrapper.java:85 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix TBLPROPERTIES so keys and value types match the SchemaIO provider's configuration schema.","Remove unknown/unsupported properties; supply required configuration fields.","Consult the provider's configurationSchema() to see the accepted property names and types."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}