{"record":{"id":"9dc1fe1dd82a40a0","repo":"apache/beam","slug":"a-transform-cannot-be-initiated-using-the-provided-config","errorCode":null,"errorMessage":"A transform cannot be initiated using the provided config row %s and the TransformPayloadTranslator %s","messagePattern":"A transform cannot be initiated using the provided config row (.+?) and the TransformPayloadTranslator (.+?)","errorType":"exception","errorClass":"java.lang.RuntimeException","httpStatus":null,"severity":"error","filePath":"sdks/java/expansion-service/src/main/java/org/apache/beam/sdk/expansion/service/ExpansionService.java","lineNumber":273,"sourceCode":"    }\n\n    @Override\n    public PTransform<InputT, OutputT> getTransform(\n        RunnerApi.FunctionSpec spec, PipelineOptions options) {\n      if (isSchemaTransform()) {\n        return ExpansionServiceSchemaTransformProvider.of().getTransform(spec, options);\n      } else {\n        try {\n          ExternalConfigurationPayload payload =\n              ExternalConfigurationPayload.parseFrom(spec.getPayload());\n          Row configRow =\n              RowCoder.of(SchemaTranslation.schemaFromProto(payload.getSchema()))\n                  .decode(new ByteArrayInputStream(payload.getPayload().toByteArray()));\n          PTransform transformFromRow = payloadTranslator.fromConfigRow(configRow, options);\n          if (transformFromRow != null) {\n            return transformFromRow;\n          } else {\n            throw new RuntimeException(\n                String.format(\n                    \"A transform cannot be initiated using the provided config row %s and the\"\n                        + \" TransformPayloadTranslator %s\",\n                    configRow, payloadTranslator));\n          }\n        } catch (Exception e) {\n          throw new RuntimeException(\n              String.format(\n                  \"Failed to build transform %s from spec %s: %s\",\n                  spec.getUrn(), spec, e.getMessage()),\n              e);\n        }\n      }\n    }\n\n    @Override\n    public InputT createInput(Pipeline p, Map<String, PCollection<?>> inputs) {\n      if (isSchemaTransform()) {","sourceCodeStart":255,"sourceCodeEnd":291,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/java/expansion-service/src/main/java/org/apache/beam/sdk/expansion/service/ExpansionService.java#L255-L291","documentation":"ExpansionService.getTransform() throws this RuntimeException when a payloadTranslator.fromConfigRow(configRow, options) returns null, meaning the TransformPayloadTranslator recognized the URN but could not build a PTransform from the supplied config Row. The config row decoded successfully, but it is not acceptable to the translator.","triggerScenarios":"Calling getTransform with a FunctionSpec whose payload decodes to a config Row that fromConfigRow rejects (missing/invalid fields), causing it to return null instead of a PTransform.","commonSituations":"Cross-language pipeline where the Python side sends config parameters the Java translator does not expect; schema evolved between SDK versions so required fields are absent; typo in a config parameter name.","solutions":["Verify the parameters sent in the transform payload match what the TransformPayloadTranslator expects","Check that both sides of the cross-language pipeline use compatible Beam versions","Inspect fromConfigRow of the translator to see which fields are required","Log/dump the configRow to compare expected vs actual fields"],"exampleFix":"// before: payload missing a required field\npayload = {'query': 'SELECT 1'}  # translator also requires 'driver'\n// after\npayload = {'query': 'SELECT 1', 'driver': 'postgresql'}","handlingStrategy":"validation","validationCode":"// verify required config fields exist before expansion\nif (!configRow.getSchema().getFieldNames().containsAll(requiredFields)) throw new IllegalArgumentException(\"missing config fields\");","typeGuard":null,"tryCatchPattern":"try { service.getTransform(spec, options); } catch (RuntimeException e) { if (e.getMessage().contains(\"transform cannot be initiated\")) { /* fix payload config row fields */ } throw e; }","preventionTips":["Match config payload fields exactly to the translator's expectations","Keep cross-language pipeline sides on compatible Beam versions","Add integration tests that expand every external transform you use"],"tags":["java","beam","expansion-service","config-row","transform"],"backgroundTag":"invalid-config-value","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}