apache/beam · error

can't get data to render

Error message

can't get data to render

What it means

The Apache Beam Go 'dot' runner renders the pipeline graph to a Graphviz .dot file. Before rendering it calls p.Build() to construct the pipeline's edge/node graph; if that construction fails for any reason, the underlying cause is discarded and this generic message is returned instead. It is a runner-side wrapper error that hides the real build failure.

Source

Thrown at sdks/go/pkg/beam/runners/dot/dot.go:47

)

func init() {
	beam.RegisterRunner("dot", Execute)
}

// Code for making DOT graphs of the Graph data structure

var dotFile = flag.String("dot_file", "", "DOT output file to create")

// Execute produces a DOT representation of the pipeline.
func Execute(ctx context.Context, p *beam.Pipeline) (beam.PipelineResult, error) {
	if *dotFile == "" {
		return nil, errors.New("must supply dot_file argument")
	}

	edges, nodes, err := p.Build()
	if err != nil {
		return nil, errors.New("can't get data to render")
	}

	var buf bytes.Buffer
	if err := dotlib.Render(edges, nodes, &buf); err != nil {
		return nil, err
	}
	return nil, os.WriteFile(*dotFile, buf.Bytes(), 0644)
}

View on GitHub (pinned to 12126d8942)

Solutions

  1. Check the pipeline code for transform/Dofn errors — the real cause is discarded, so run the pipeline under a different runner (e.g. direct) to surface the underlying Build() error
  2. Verify every transform added to the pipeline is valid and fully specified before enabling the dot runner
  3. Update to a recent Beam version where error wrapping may preserve the underlying cause

Example fix

// before
edges, nodes, err := p.Build()
if err != nil {
	return nil, errors.New("can't get data to render")
}
// after
edges, nodes, err := p.Build()
if err != nil {
	return nil, fmt.Errorf("can't get data to render: %w", err)
}
Defensive patterns

Strategy: validation

Validate before calling

// validate the pipeline constructs before using the dot runner
edges, nodes, err := p.Build()
if err != nil {
	return fmt.Errorf("pipeline build failed: %w", err)
}

Try / catch

// Go: inspect the returned error and fall back to a detailed run
if _, err := dotrender.Execute(ctx, p); err != nil {
	if strings.Contains(err.Error(), "can't get data to render") {
		// re-run with direct runner to get the real build error
	}
}

Prevention

When it happens

Trigger: Calling the dot runner (dot_file flag set) with a pipeline whose p.Build() fails — e.g. a DoFn that panics during expansion, an invalid cross-language transform, or an unsupported transform in the graph.

Common situations: Developers wiring up the experimental dot runner to visualize a pipeline; pipelines with transforms the builder cannot expand; misuse of beam.Impulse/side inputs that break graph construction.

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/7086e0c806646a0b. Report an issue: GitHub.