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

  1. Run the pipeline under the direct runner first to get the detailed Build() error, since vet discards the cause
  2. Fix the offending transform/DoFn flagged by the direct-run error
  3. Keep the resolver/disabledResolver path in mind — avoid transforms requiring runtime type resolution when vetting
  4. 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

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


AI-assisted analysis of apache/beam@12126d8942 (2026-09-13). Data as JSON: /api/errors/8c2dbb7be5638573. Report an issue: GitHub.