apache/beam · error · InvalidTableException

InvalidTableException(e.getMessage())

Error message

InvalidTableException(e.getMessage())

What it means

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.

Source

Thrown at sdks/java/extensions/sql/src/main/java/org/apache/beam/sdk/extensions/sql/meta/provider/SchemaIOTableProviderWrapper.java:85

  @Override
  public BeamSqlTable buildBeamSqlTable(Table tableDefinition) {
    ObjectNode tableProperties = tableDefinition.getProperties();

    try {
      RowJson.RowJsonDeserializer deserializer =
          RowJson.RowJsonDeserializer.forSchema(getSchemaIOProvider().configurationSchema())
              .withNullBehavior(RowJson.RowJsonDeserializer.NullBehavior.ACCEPT_MISSING_OR_NULL);

      Row configurationRow =
          newObjectMapperWith(deserializer).readValue(tableProperties.toString(), Row.class);

      SchemaIO schemaIO =
          getSchemaIOProvider()
              .from(tableDefinition.getLocation(), configurationRow, tableDefinition.getSchema());

      return new SchemaIOTableWrapper(schemaIO);
    } catch (InvalidConfigurationException | InvalidSchemaException e) {
      throw new InvalidTableException(e.getMessage());
    } catch (JsonProcessingException e) {
      throw new AssertionError("Failed to re-parse TBLPROPERTIES JSON " + tableProperties);
    }
  }

  protected BeamTableStatistics getTableStatistics(PipelineOptions options, SchemaIO schemaIO) {
    if (isBounded().equals(PCollection.IsBounded.BOUNDED)) {
      return BeamTableStatistics.BOUNDED_UNKNOWN;
    }
    return BeamTableStatistics.UNBOUNDED_UNKNOWN;
  }

  private PCollection.IsBounded isBounded() {
    return getSchemaIOProvider().isBounded();
  }

  /** A generalized {@link BeamSqlTable} for IOs to create IO readers and writers. */
  private class SchemaIOTableWrapper extends BaseBeamTable {

View on GitHub (pinned to 12126d8942)

Solutions

  1. Fix TBLPROPERTIES so keys and value types match the SchemaIO provider's configuration schema.
  2. Remove unknown/unsupported properties; supply required configuration fields.
  3. Consult the provider's configurationSchema() to see the accepted property names and types.
Defensive patterns

Strategy: try-catch

When it happens

Trigger: 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.

Common situations: See trigger scenarios.


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/6d0d128928b8915b. Report an issue: GitHub.