apache/beam · error · java.lang.IllegalArgumentException

Config schema provided with the expansion request

Error message

Config schema provided with the expansion request %s is not compatible with the config of the Schema transform %s.

What it means

getTransform validates that the configuration Schema sent in the expansion request is assignableTo the provider's declared configurationSchema(). If not compatible, it throws IllegalArgumentException with this formatted message including both schemas. This prevents applying a config row that the transform cannot interpret.

Solutions

  1. Align client and provider versions so the request schema matches provider.configurationSchema()
  2. Fix the configuration row/schema field names and types in the pipeline to match the provider's declared configuration schema
  3. Regenerate the transform configuration using the SDK API (e.g., builder methods) rather than hand-assembled schemas

Example fix

// before
.withConfig(Schema.of(Field.of("table_name", FieldType.STRING)))
// after
.withConfig(Schema.of(Field.of("tableName", FieldType.STRING))) // matches provider.configurationSchema()
Defensive patterns

Strategy: validation

Validate before calling

Schema req = SchemaTranslation.schemaFromProto(payload.getConfigurationSchema());
Schema prov = provider.configurationSchema();
if (!req.assignableTo(prov)) { throw new IllegalStateException("Config schema mismatch"); }

Try / catch

try { expanded = service.expand(request); } catch (IllegalArgumentException e) { if (e.getMessage().contains("is not compatible with the config")) { /* align schemas/versions */ } throw e; }

Prevention

When it happens

Trigger: Expansion request whose payload.configurationSchema does not match (is not schema-assignable to) provider.configurationSchema() — e.g., renamed/removed/retyped fields, or a request built against a different Beam/provider version.

Common situations: Client pipeline compiled against an older version of a SchemaTransform whose config schema changed; hand-built configuration rows with wrong field names/types; provider upgraded on the service but not the client.

Understand the failure class

Background: Schema validation failed / invalid input schema: payload rejected because its shape doesn't match the expected schema — this error's family across 28 libraries.

Related errors


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

Appendix: source

Thrown at sdks/java/expansion-service/src/main/java/org/apache/beam/sdk/expansion/service/ExpansionServiceSchemaTransformProvider.java:122

    } catch (InvalidProtocolBufferException e) {
      throw new IllegalArgumentException(
          "Invalid payload type for URN " + getUrn(ExpansionMethods.Enum.SCHEMA_TRANSFORM), e);
    }

    String identifier = payload.getIdentifier();
    org.apache.beam.sdk.schemas.transforms.SchemaTransformProvider provider =
        schemaTransformProviders.get(identifier);
    if (provider == null) {
      throw new IllegalArgumentException(
          "Could not find a SchemaTransform with identifier " + identifier);
    }

    Schema configSchemaFromRequest =
        SchemaTranslation.schemaFromProto(payload.getConfigurationSchema());
    Schema configSchemaFromProvider = provider.configurationSchema();

    if (!configSchemaFromRequest.assignableTo(configSchemaFromProvider)) {
      throw new IllegalArgumentException(
          String.format(
              "Config schema provided with the expansion request %s is not compatible with the "
                  + "config of the Schema transform %s.",
              configSchemaFromRequest, configSchemaFromProvider));
    }

    Row configRow;
    try {
      configRow =
          RowCoder.of(configSchemaFromRequest).decode(payload.getConfigurationRow().newInput());
    } catch (IOException e) {
      throw new RuntimeException("Error decoding payload", e);
    }

    return provider.from(configRow);
  }

  Iterable<org.apache.beam.sdk.schemas.transforms.SchemaTransformProvider> getAllProviders() {

View on GitHub (pinned to 12126d8942)