{"record":{"id":"029e55c284d06242","repo":"apache/beam","slug":"config-schema-provided-with-the-expansion-request-s-is-not","errorCode":null,"errorMessage":"Config schema provided with the expansion request %s is not compatible with the config of the Schema transform %s.","messagePattern":"Config schema provided with the expansion request (.+?) is not compatible with the config of the Schema transform (.+?)\\.","errorType":"exception","errorClass":"java.lang.IllegalArgumentException","httpStatus":null,"severity":"error","filePath":"sdks/java/expansion-service/src/main/java/org/apache/beam/sdk/expansion/service/ExpansionServiceSchemaTransformProvider.java","lineNumber":122,"sourceCode":"    } catch (InvalidProtocolBufferException e) {\n      throw new IllegalArgumentException(\n          \"Invalid payload type for URN \" + getUrn(ExpansionMethods.Enum.SCHEMA_TRANSFORM), e);\n    }\n\n    String identifier = payload.getIdentifier();\n    org.apache.beam.sdk.schemas.transforms.SchemaTransformProvider provider =\n        schemaTransformProviders.get(identifier);\n    if (provider == null) {\n      throw new IllegalArgumentException(\n          \"Could not find a SchemaTransform with identifier \" + identifier);\n    }\n\n    Schema configSchemaFromRequest =\n        SchemaTranslation.schemaFromProto(payload.getConfigurationSchema());\n    Schema configSchemaFromProvider = provider.configurationSchema();\n\n    if (!configSchemaFromRequest.assignableTo(configSchemaFromProvider)) {\n      throw new IllegalArgumentException(\n          String.format(\n              \"Config schema provided with the expansion request %s is not compatible with the \"\n                  + \"config of the Schema transform %s.\",\n              configSchemaFromRequest, configSchemaFromProvider));\n    }\n\n    Row configRow;\n    try {\n      configRow =\n          RowCoder.of(configSchemaFromRequest).decode(payload.getConfigurationRow().newInput());\n    } catch (IOException e) {\n      throw new RuntimeException(\"Error decoding payload\", e);\n    }\n\n    return provider.from(configRow);\n  }\n\n  Iterable<org.apache.beam.sdk.schemas.transforms.SchemaTransformProvider> getAllProviders() {","sourceCodeStart":104,"sourceCodeEnd":140,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/expansion-service/src/main/java/org/apache/beam/sdk/expansion/service/ExpansionServiceSchemaTransformProvider.java#L104-L140","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Align client and provider versions so the request schema matches provider.configurationSchema()","Fix the configuration row/schema field names and types in the pipeline to match the provider's declared configuration schema","Regenerate the transform configuration using the SDK API (e.g., builder methods) rather than hand-assembled schemas"],"exampleFix":"// before\n.withConfig(Schema.of(Field.of(\"table_name\", FieldType.STRING)))\n// after\n.withConfig(Schema.of(Field.of(\"tableName\", FieldType.STRING))) // matches provider.configurationSchema()","handlingStrategy":"validation","validationCode":"Schema req = SchemaTranslation.schemaFromProto(payload.getConfigurationSchema());\nSchema prov = provider.configurationSchema();\nif (!req.assignableTo(prov)) { throw new IllegalStateException(\"Config schema mismatch\"); }","typeGuard":null,"tryCatchPattern":"try { expanded = service.expand(request); } catch (IllegalArgumentException e) { if (e.getMessage().contains(\"is not compatible with the config\")) { /* align schemas/versions */ } throw e; }","preventionTips":["Use SDK builder APIs to generate config schemas instead of hand-built ones","Upgrade client and provider together when configurationSchema changes","Diff request schema against provider.configurationSchema() during integration tests"],"tags":["java","beam","schema"],"backgroundTag":"schema-validation-failed","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-20T03:17:13.778Z"}