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 value coder: %w
What it means
ExecuteTransform for GBK resolves the KV's value component coder (component 1) last. If lpUnknownCoders fails on it, the runner panics with this message, identifying the stage, transform, and wrapped cause. It means the value side of the grouped KV could not be decoded/encoded as specified.
Source
Thrown at sdks/go/pkg/beam/runners/prism/internal/handlerunner.go:440
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")
}
default:
panic(fmt.Sprintf("unimplemented runner transform[%v]", urn))
}
// To avoid conflicts with these single transform
// bundles, we suffix the transform IDs.
var localID stringView on GitHub (pinned to 12126d8942)
Solutions
- Check the wrapped error for the failing value coder reference.
- Make sure value coders for all elements reaching the GBK are registered and emitted into the pipeline.
- Regenerate the pipeline with a current SDK, or switch to built-in coders for the value type.
Defensive patterns
Strategy: validation
Validate before calling
// Check the GBK KV's value component coder resolves
kvc := codersByID[gbkInputCoderID]
if len(kvc.GetComponentCoderIds()) < 2 {
log.Fatalf("GBK input coder missing value component")
}
valID := kvc.GetComponentCoderIds()[1]
if _, ok := codersByID[valID]; !ok {
log.Fatalf("value coder %q not registered", valID)
} Try / catch
defer func() {
if r := recover(); r != nil && strings.Contains(fmt.Sprint(r), "couldn't process value coder") {
log.Fatalf("GBK value coder unresolved: %v", r)
}
}() Prevention
- Register custom value coders so they serialize into the pipeline
- Test GBK pipelines with built-in types first to isolate custom-coder issues
- Verify cross-language expansion emits value coders for grouped inputs
When it happens
Trigger: A GBK whose KV coder's componentCoderIds[1] points to an unresolvable or unsupported coder in comps.GetCoders().
Common situations: Custom value coders omitted from the pipeline proto; cross-language pipelines where the value coder isn't registered; malformed CoGroupByKey/GBK graphs.
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/6bed0f1ed0d03ef5.
Report an issue: GitHub.