{"record":{"id":"e90ef0f550a9438d","repo":"apache/beam","slug":"unsupported-window-mapping-fn-urn-v","errorCode":null,"errorMessage":"unsupported window mapping fn URN %v","messagePattern":"unsupported window mapping fn URN (.+?)","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/core/runtime/exec/translate.go","lineNumber":316,"sourceCode":"\tcase graphx.URNWindowMappingSliding:\n\t\tvar payload pipepb.SlidingWindowsPayload\n\t\tif err := proto.Unmarshal(wmfn.GetPayload(), &payload); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tperiodPB := payload.GetPeriod()\n\t\tif err := periodPB.CheckValid(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tperiod := periodPB.AsDuration()\n\n\t\tsizePB := payload.GetSize()\n\t\tif err := sizePB.CheckValid(); err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tsize := sizePB.AsDuration()\n\t\treturn &windowMapper{wfn: window.NewSlidingWindows(period, size)}, nil\n\tdefault:\n\t\treturn nil, fmt.Errorf(\"unsupported window mapping fn URN %v\", urn)\n\t}\n}\n\nfunc (b *builder) makePCollections(out []string) ([]Node, error) {\n\tvar ret []Node\n\tfor _, o := range out {\n\t\tn, err := b.makePCollection(o)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\t// This is the cleanest place to do this check and filtering,\n\t\t// since DataSinks don't know their inputs, due to the construction\n\t\t// call stack.\n\t\t// A Source->Sink is both uncommon and inefficent, with the Source eliding the\n\t\t// collection anyway.\n\t\t// TODO[BEAM-6374): Properly handle the multiplex and flatten cases.\n\t\t// Right now we just stop datasink collection.\n\t\tswitch out := n.Out.(type) {","sourceCodeStart":298,"sourceCodeEnd":334,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/core/runtime/exec/translate.go#L298-L334","documentation":"unmarshalAndMakeWindowMapping converts a WindowMappingFn proto (by URN) into an executable window mapper. If the URN is not one of the recognized mappings (global, session, fixed-windows, sliding-windows), the translation cannot proceed. This means the pipeline graph references a window-mapping function this SDK build does not know.","triggerScenarios":"Deserializing a pipeline whose PTransform/GBK edge carries a window mapping URN produced by a newer SDK, another language SDK, or a custom mapping fn — then translating it for Go execution.","commonSituations":"Cross-language pipelines where a Python/Java side emitted a mapping URN the Go runner doesn't support; SDK version skew between pipeline authoring and worker; custom windowing strategies not registered in Go.","solutions":["Use a supported window mapping (global default, sessions, fixed, or sliding windows) in the pipeline.","Align SDK versions: regenerate the pipeline with a Beam version whose Go runner supports the URN.","If cross-language, ensure the mapping fn is materialized on the producing side in a supported form.","Add a case in unmarshalAndMakeWindowMapping if you own the code and need a new URN registered."],"exampleFix":"// before: custom/unknown mapping URN from another SDK\nwfn := window.MapWindows(customMapper{})\n// after: use a supported mapping\nw := window.NewFixedWindows(60 * time.Second) // supported by Go translate","handlingStrategy":"validation","validationCode":"supported := map[string]bool{\"beam:window_fn:global_windows:v1\": true, \"beam:window_fn:session_windows:v1\": true, \"beam:window_fn:fixed_windows:v1\": true, \"beam:window_fn:sliding_windows:v1\": true}\nif !supported[urn] { return fmt.Errorf(\"unsupported window mapping URN %q\", urn) }","typeGuard":"func isSupportedWindowURN(urn string) bool { switch urn { case \"beam:window_fn:global_windows:v1\", \"beam:window_fn:fixed_windows:v1\", \"beam:window_fn:sliding_windows:v1\", \"beam:window_fn:session_windows:v1\": return true }; return false }","tryCatchPattern":"mapper, err := unmarshalAndMakeWindowMapping(pb.GetWindowMappingFn())\nif err != nil {\n    return nil, fmt.Errorf(\"window mapping unsupported on Go runner: %w\", err)\n}","preventionTips":["Use standard windowing strategies supported by the Go runner","Align SDK versions across cross-language pipeline components","Fail fast at pipeline-construction time on custom mapping fns"],"tags":["beam-go","windowing","unsupported-urn","translation"],"backgroundTag":"invalid-enum-value","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"}