{"record":{"id":"7086e0c806646a0b","repo":"apache/beam","slug":"can-t-get-data-to-render","errorCode":null,"errorMessage":"can't get data to render","messagePattern":"can't get data to render","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/dot/dot.go","lineNumber":47,"sourceCode":")\n\nfunc init() {\n\tbeam.RegisterRunner(\"dot\", Execute)\n}\n\n// Code for making DOT graphs of the Graph data structure\n\nvar dotFile = flag.String(\"dot_file\", \"\", \"DOT output file to create\")\n\n// Execute produces a DOT representation of the pipeline.\nfunc Execute(ctx context.Context, p *beam.Pipeline) (beam.PipelineResult, error) {\n\tif *dotFile == \"\" {\n\t\treturn nil, errors.New(\"must supply dot_file argument\")\n\t}\n\n\tedges, nodes, err := p.Build()\n\tif err != nil {\n\t\treturn nil, errors.New(\"can't get data to render\")\n\t}\n\n\tvar buf bytes.Buffer\n\tif err := dotlib.Render(edges, nodes, &buf); err != nil {\n\t\treturn nil, err\n\t}\n\treturn nil, os.WriteFile(*dotFile, buf.Bytes(), 0644)\n}\n","sourceCodeStart":29,"sourceCodeEnd":56,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/dot/dot.go#L29-L56","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["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","Verify every transform added to the pipeline is valid and fully specified before enabling the dot runner","Update to a recent Beam version where error wrapping may preserve the underlying cause"],"exampleFix":"// before\nedges, nodes, err := p.Build()\nif err != nil {\n\treturn nil, errors.New(\"can't get data to render\")\n}\n// after\nedges, nodes, err := p.Build()\nif err != nil {\n\treturn nil, fmt.Errorf(\"can't get data to render: %w\", err)\n}","handlingStrategy":"validation","validationCode":"// validate the pipeline constructs before using the dot runner\nedges, nodes, err := p.Build()\nif err != nil {\n\treturn fmt.Errorf(\"pipeline build failed: %w\", err)\n}","typeGuard":null,"tryCatchPattern":"// Go: inspect the returned error and fall back to a detailed run\nif _, err := dotrender.Execute(ctx, p); err != nil {\n\tif strings.Contains(err.Error(), \"can't get data to render\") {\n\t\t// re-run with direct runner to get the real build error\n\t}\n}","preventionTips":["Run the pipeline under the direct runner first to validate graph construction","Validate all transforms are added before enabling the dot_file flag","Keep Beam updated; newer versions wrap Build errors with %w"],"tags":["go","beam","pipeline-graph","runner"],"backgroundTag":"internal-invariant-violation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}