{"record":{"id":"b1b7dbc193040797","repo":"apache/beam","slug":"multiple-keys-for-exclusively-split-element-wvalue-value","errorCode":null,"errorMessage":"Multiple keys for exclusively split element: ${wvalue.value}","messagePattern":"Multiple keys for exclusively split element: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"error","filePath":"sdks/typescript/src/apache_beam/worker/operators.ts","lineNumber":826,"sourceCode":"  }\n\n  async finishBundle() {}\n}\n\nclass SplittingDoFnOperator implements IOperator {\n  constructor(\n    public transformId: string,\n    private receivers: { [key: string]: Receiver },\n    private options: SplitOptions,\n  ) {}\n\n  async startBundle() {}\n\n  process(wvalue: WindowedValue<unknown>) {\n    const result = new ProcessResultBuilder();\n    const keys = Object.keys(wvalue.value as object);\n    if (this.options.exclusive && keys.length !== 1) {\n      throw new Error(\n        \"Multiple keys for exclusively split element: \" + wvalue.value,\n      );\n    }\n    for (let tag of keys) {\n      if (!this.options.knownTags!.includes(tag)) {\n        if (this.options.unknownTagBehavior === \"rename\") {\n          tag = this.options.unknownTagName!;\n        } else if (this.options.unknownTagBehavior === \"ignore\") {\n          continue;\n        } else {\n          throw new Error(\n            \"Unexpected tag '\" +\n              tag +\n              \"' for \" +\n              wvalue.value +\n              \" not in \" +\n              this.options.knownTags,\n          );","sourceCodeStart":808,"sourceCodeEnd":844,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/typescript/src/apache_beam/worker/operators.ts#L808-L844","documentation":"SplittingDoFnOperator with exclusive split options requires each incoming element to be a plain object carrying exactly one output tag; Object.keys on the element yielded more than one key. The element (wvalue.value) is the input at fault — an exclusively-split DoFn must emit to exactly one output per element.","triggerScenarios":"Thrown at sdks/typescript/src/apache_beam/worker/operators.ts:826 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Fix the splitting DoFn so process() emits exactly one keyed output per element when exclusive is set.","If multiple outputs per element are legitimate, configure the operator with exclusive: false and declare the output tags.","Ensure the emitted object isn't accidentally multi-keyed (e.g. spread of extra properties)."],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"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"}