apache/beam · error
ExecuteTransform[GBK] stage %v, transform %q %v: couldn't pr
Error message
ExecuteTransform[GBK] stage %v, transform %q %v: couldn't process window coder: %w
What it means
When the prism runner executes a GBK (GroupByKey) transform, it must resolve the stage's window coder via lpUnknownCoders before it can decode/encode grouped data. If lpUnknownCoders returns an error (unknown or unsatisfiable coder reference), ExecuteTransform panics with this message, embedding the stage ID, transform ID, prototext of the transform, and the wrapped cause.
Source
Thrown at sdks/go/pkg/beam/runners/prism/internal/handlerunner.go:432
for _, out := range t.GetOutputs() {
onlyOut = out
}
switch urn {
case urns.TransformFlatten:
// Already done and collated.
data = inputData
case urns.TransformGBK:
ws := windowingStrategy(comps, tid)
kvc := onlyInputCoderForTransform(comps, tid)
coders := map[string]*pipepb.Coder{}
// TODO assert this is a KV. It's probably fine, but we should fail anyway.
wcID, err := lpUnknownCoders(ws.GetWindowCoderId(), coders, comps.GetCoders())
if err != nil {
panic(fmt.Errorf("ExecuteTransform[GBK] stage %v, transform %q %v: couldn't process window coder:\n%w", stageID, tid, prototext.Format(t), err))
}
kcID, err := lpUnknownCoders(kvc.GetComponentCoderIds()[0], coders, comps.GetCoders())
if err != nil {
panic(fmt.Errorf("ExecuteTransform[GBK] stage %v, transform %q %v: couldn't process key coder:\n%w", stageID, tid, prototext.Format(t), err))
}
ecID, err := lpUnknownCoders(kvc.GetComponentCoderIds()[1], coders, comps.GetCoders())
if err != nil {
panic(fmt.Errorf("ExecuteTransform[GBK] stage %v, transform %q %v: couldn't process value coder:\n%w", stageID, tid, prototext.Format(t), err))
}
reconcileCoders(coders, comps.GetCoders())
wc := coders[wcID]
kc := coders[kcID]
ec := coders[ecID]
data = append(data, gbkBytes(ws, wc, kc, ec, inputData, coders))
if len(data[0]) == 0 {
panic("no data for GBK")View on GitHub (pinned to 12126d8942)
Solutions
- Read the wrapped error to identify which coder reference failed resolution.
- Ensure all coders referenced by the GBK's windowing strategy are present in the pipeline's coder components.
- Use standard Beam coders or register custom coders so they are emitted into the pipeline proto.
Defensive patterns
Strategy: validation
Validate before calling
// Confirm the GBK input's windowing strategy references a registered coder
ws := transform.WindowingStrategy
if _, ok := codersByID[ws.GetWindowCoderId()]; !ok {
log.Fatalf("window coder %q not registered", ws.GetWindowCoderId())
} Try / catch
// This is a panic, not an error return — recover it
func runWithRecover() (err error) {
defer func() {
if r := recover(); r != nil {
err = fmt.Errorf("GBK coder failure: %v", r)
}
}()
return beamx.Run(ctx, p)
} Prevention
- Prefer built-in Beam coders for windowing metadata
- Register custom coders so they are emitted into the pipeline proto
- Avoid hand-editing serialized pipeline protos
When it happens
Trigger: A GBK stage whose components reference a window coder ID that lpUnknownCoders cannot resolve or rewrite from comps.GetCoders().
Common situations: Corrupted or hand-modified pipeline protos; custom coders registered on one side of a cross-language pipeline but not the other; SDK coder URNs unsupported by prism.
Understand the failure class
Background: "cannot parse invalid wire-format data", "cannot unmarshal", "failed unmarshalling": protobuf unmarshal errors explained — this error's family across 10 libraries.
Related errors
- ExecuteTransform[GBK] stage %v, transform %q %v: couldn't pr
- ExecuteTransform[GBK] stage %v, transform %q %v: couldn't pr
- makeWindowedValueCoder: couldn't process coder for pcollecti
- lpUnknownCoders: coder %q not present in base map
- lpUnknownCoders: couldn't handle component %d %q of %q %v: %
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/5790a41a832745b2.
Report an issue: GitHub.