apache/beam · error
can't get data to generate
Error message
can't get data to generate
What it means
The Beam Go 'vet' runner analyzes a pipeline to check DoFn correctness. Like the dot runner, it calls p.Build() and, on any build failure, replaces the real cause with the generic 'can't get data to generate'. This means the pipeline graph could not be constructed, so the vet analysis cannot proceed.
Source
Thrown at sdks/go/pkg/beam/runners/vet/vet.go:89
err := errors.Errorf("pipeline is not performant, see diagnostic summary:\n%s\n%s", e.d.String(), string(e.Bytes()))
err = errors.WithContext(err, "validating pipeline with vet runner")
return nil, errors.SetTopLevelMsg(err, "pipeline is not performant")
}
// Pipeline nas no further tasks.
return nil, nil
}
// Evaluate returns an object that can generate necessary shims and inits.
func Evaluate(_ context.Context, p *beam.Pipeline) (*Eval, error) {
// Disable the resolver so we can see functions that are that are already registered.
r := runtime.Resolver
runtime.Resolver = disabledResolver(false)
// Reinstate the resolver when we're through.
defer func() { runtime.Resolver = r }()
edges, _, err := p.Build()
if err != nil {
return nil, errors.New("can't get data to generate")
}
e := newEval()
e.diag("/**\n")
err = e.extractFromMultiEdges(edges)
return e, err
}
func newEval() *Eval {
return &Eval{
functions: make(map[string]*funcx.Fn),
types: make(map[string]reflect.Type),
funcs: make(map[string]reflect.Type),
emits: make(map[string]reflect.Type),
iters: make(map[string]reflect.Type),
imports: make(map[string]struct{}),
allExported: true,View on GitHub (pinned to 12126d8942)
Solutions
- Run the pipeline under the direct runner first to get the detailed Build() error, since vet discards the cause
- Fix the offending transform/DoFn flagged by the direct-run error
- Keep the resolver/disabledResolver path in mind — avoid transforms requiring runtime type resolution when vetting
- Update Beam in case the build failure is a known bug
Example fix
// before
edges, _, err := p.Build()
if err != nil {
return nil, errors.New("can't get data to generate")
}
// after
edges, _, err := p.Build()
if err != nil {
return nil, fmt.Errorf("can't get data to generate: %w", err)
} Defensive patterns
Strategy: validation
Validate before calling
edges, _, err := p.Build()
if err != nil {
return fmt.Errorf("vet: pipeline does not build: %w", err)
} Try / catch
if _, err := vet.Evaluate(ctx, p, opts); err != nil {
if strings.Contains(err.Error(), "can't get data to generate") {
// run direct runner to obtain the detailed build error
}
return err
} Prevention
- Ensure the pipeline builds under the direct runner before vetting
- Avoid transforms requiring runtime type resolution during vet
- Keep DoFn constructors panic-free at graph-construction time
When it happens
Trigger: Running the vet runner against a pipeline whose p.Build() fails — invalid or un-expandable transforms, panicking DoFn constructors, malformed cross-language transforms.
Common situations: Vetting pipelines during CI that contain transforms Beam cannot expand; misconfigured side inputs; code that compiles but fails at pipeline-construction time.
Understand the failure class
Background: "This is a bug, please report it": internal invariant violations, unreachable panics, and SNH errors explained — this error's family across 47 libraries.
Related errors
- can't get data to render
- stage requires multiple parallel inputs but wasn't a flatten
- Type interface{} isn't a supported PCollection type
- Iterators with timestamp values (<ET,V> and <ET, K, V>) are
- Type interface{} isn't a supported PCollection type
AI-assisted analysis of apache/beam@12126d8942 (2026-09-13).
Data as JSON: /api/errors/8c2dbb7be5638573.
Report an issue: GitHub.