apache/beam · error · AssertionError

Failed to re-parse TBLPROPERTIES JSON

Error message

Failed to re-parse TBLPROPERTIES JSON 

What it means

A sibling guard in SchemaIOTableProviderWrapper.buildBeamSqlTable: when re-parsing the stored TBLPROPERTIES JSON into a configuration Row fails, the wrapper raises InvalidTableException with a 'Failed to re-parse TBLPROPERTIES JSON' message plus the cause. It signals malformed or schema-incompatible JSON in the table definition rather than an IO problem.

Solutions

  1. Validate the TBLPROPERTIES JSON syntax before creating the table.
  2. Align property keys/types with the SchemaIO configuration schema (ACCEPT_MISSING_OR_NULL null behavior is allowed, wrong types are not).
  3. Inspect the wrapped exception for the exact JSON deserialization failure point.
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:87 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/171f432cf1d32d66. Report an issue: GitHub.

Appendix: source

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

    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 {
    protected final SchemaIO schemaIO;

View on GitHub (pinned to 12126d8942)