{"record":{"id":"63f0384796f01b93","repo":"apache/beam","slug":"external-transforms-like-v-are-not-supported-in-the-go","errorCode":null,"errorMessage":"external transforms like %v are not supported in the Go direct runner, please execute your pipeline on a different runner","messagePattern":"external transforms like (.+?) are not supported in the Go direct runner, please execute your pipeline on a different runner","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"sdks/go/pkg/beam/runners/direct/direct.go","lineNumber":340,"sourceCode":"\n\tcase graph.Reshuffle:\n\t\t// Reshuffle is a no-op in the direct runner, as there's only a single bundle\n\t\t// on a single worker. Hoist the next node up in the cache.\n\t\tb.links[id] = out[0]\n\t\treturn b.links[id], nil\n\n\tcase graph.Flatten:\n\t\tu = &exec.Flatten{UID: b.idgen.New(), N: len(edge.Input), Out: out[0]}\n\n\t\tfor i := 0; i < len(edge.Input); i++ {\n\t\t\tb.links[linkID{edge.ID(), i}] = u\n\t\t}\n\n\tcase graph.WindowInto:\n\t\tu = &exec.WindowInto{UID: b.idgen.New(), Fn: edge.WindowFn, Out: out[0]}\n\n\tcase graph.External:\n\t\treturn nil, errors.Errorf(\"external transforms like %v are not supported in the Go direct runner, please execute your pipeline on a different runner\", edge)\n\n\tdefault:\n\t\treturn nil, errors.Errorf(\"unexpected edge: %v\", edge)\n\t}\n\n\tb.links[id] = u\n\tb.units = append(b.units, u)\n\treturn u, nil\n}\n","sourceCodeStart":322,"sourceCodeEnd":350,"githubUrl":"https://github.com/apache/beam/blob/12126d8942aaf848030c478b4c6a28c6af861c66/sdks/go/pkg/beam/runners/direct/direct.go#L322-L350","documentation":"makeLink translates each graph edge into an executable unit. When it encounters a graph.External edge (a cross-language transform), the Go direct runner cannot execute it and returns this hard error directing the developer to another runner. It is a deliberate capability limitation, not a data-dependent failure.","triggerScenarios":"Running a pipeline containing cross-language transforms (e.g. Java/Python external transforms added via beam.CrossLanguageTransform / xlang expansion) on the Go direct runner.","commonSituations":"Go pipelines incorporating transforms from the Java or Python SDK (Kafka IO, SQL, TFX); examples copied from docs that rely on xlang; teams testing locally with 'direct' before submitting to Flink/Spark/Dataflow.","solutions":["Run the pipeline on a runner that supports external transforms (Dataflow, Flink, Spark) instead of 'direct'.","Replace the external transform with a pure-Go equivalent transform if one exists.","Use the expansion service only with a compatible runner; check docs for Go-native alternatives of the needed IO.","Isolate xlang usage in a separate pipeline stage executed on a supported runner."],"exampleFix":"// before\nbeam.Run(ctx, \"direct\", p) // pipeline contains Java Kafka IO external transform\n// after\nbeam.Run(ctx, runner, p) // runner from --runner=flink / dataflow, which supports external transforms","handlingStrategy":"validation","validationCode":"// fail fast if the pipeline contains cross-language transforms\nfor _, t := range pipelineTransforms(p) {\n    if isExternal(t) {\n        return fmt.Errorf(\"transform %v is external; use flink/dataflow runner\", t)\n    }\n}","typeGuard":null,"tryCatchPattern":"if _, err := beam.Run(ctx, runner, p); err != nil && strings.Contains(err.Error(), \"not supported in the Go direct runner\") {\n    log.Printf(\"re-run with a distributed runner: %v\", err)\n}","preventionTips":["Check the transform list for xlang/external transforms before choosing the direct runner.","Maintain pure-Go alternatives for IOs you need locally.","Document which runners your pipeline supports."],"tags":["go","beam","direct-runner","xlang","unsupported-feature"],"backgroundTag":"unsupported-operation","analyzedSha":"12126d8942aaf848030c478b4c6a28c6af861c66","analyzedAt":"2026-09-13T01:50:10.254Z","contentChangedAt":"2026-09-13T01:50:10.254Z","schemaVersion":2},"datasetVersion":"2026-09-14T21:17:11.552Z"}