apache/beam · error
input to MultiMap side input must be KV, got
Error message
input to MultiMap side input must be KV, got %v
What it means
Error returned by tryBindInbound in the graph binder when a side input of kind funcx.FnMultiMap is being bound and the PCollection type t is not KV. MultiMap side inputs expose per-key iterables, which requires the side-input collection to be a KV<K, V> type; any other full type is rejected with this message showing the offending type.
Solutions
- Feed the MultiMap side input a KV<K,V> PCollection (apply beam.CoGBK or a KV conversion before the ParDo)
- Use a different side-input kind (e.g. Iter/ReIter) if the collection is not KV
Defensive patterns
Strategy: validation
When it happens
Trigger: Thrown at sdks/go/pkg/beam/core/graph/bind.go:218 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/769cc3dd069819ce.
Report an issue: GitHub.
Appendix: source
Thrown at sdks/go/pkg/beam/core/graph/bind.go:218
if len(trimmed) != 1 {
return nil, kind, errors.Errorf("%v cannot bind to %v", t, args[0])
}
kind = Iter
other = typex.New(trimmed[0])
case funcx.FnReIter:
values, _ := funcx.UnfoldReIter(args[0].T)
trimmed := trimIllegal(values)
if len(trimmed) != 1 {
return nil, kind, errors.Errorf("%v cannot bind to %v", t, args[0])
}
kind = ReIter
other = typex.New(trimmed[0])
case funcx.FnMultiMap:
return nil, kind, errors.Errorf("input to MultiMap side input must be KV, got %v", t)
default:
return nil, kind, errors.Errorf("unexpected param kind: %v", arg)
}
}
case typex.Composite:
switch t.Type() {
case typex.KVType:
if isMain {
if args[0].Kind != funcx.FnValue {
return nil, kind, errors.Errorf("key of %v cannot bind to %v", t, args[0])
}
if args[1].Kind != funcx.FnValue {
return nil, kind, errors.Errorf("value of %v cannot bind to %v", t, args[1])
}
other = typex.NewKV(typex.New(args[0].T), typex.New(args[1].T))
} else {
switch args[0].Kind {View on GitHub (pinned to 12126d8942)