package xlang

import "github.com/apache/beam/sdks/v2/go/examples/xlang"

Package xlang contains functionality for testing cross-language transforms.

Index

Functions

func CoGroupByKey

func CoGroupByKey(s beam.Scope, addr string, col1, col2 beam.PCollection) beam.PCollection

func CombineGlobally

func CombineGlobally(s beam.Scope, addr string, col beam.PCollection) beam.PCollection

func CombinePerKey

func CombinePerKey(s beam.Scope, addr string, col beam.PCollection) beam.PCollection

func Count

func Count(s beam.Scope, addr string, col beam.PCollection) beam.PCollection

func Flatten

func Flatten(s beam.Scope, addr string, col1, col2 beam.PCollection) beam.PCollection

func GroupByKey

func GroupByKey(s beam.Scope, addr string, col beam.PCollection) beam.PCollection

func Multi

func Multi(s beam.Scope, addr string, main1, main2, side beam.PCollection) (mainOut, sideOut beam.PCollection)

func Partition

func Partition(s beam.Scope, addr string, col beam.PCollection) (out0, out1 beam.PCollection)

func Prefix

func Prefix(s beam.Scope, prefix string, addr string, col beam.PCollection) beam.PCollection

Prefix wraps a cross-language transform call to the Prefix transform. This transform takes a PCollection of strings as input, and a payload defining a prefix string, and appends that as prefix to each input string.

This serves as an example of a cross-language transform with a payload.

Source Files

transforms.go

Directories

PathSynopsis
go/examples/xlang/bigqueryWordcount is an example using cross-language BigQuery transforms to read and write to BigQuery.
go/examples/xlang/cogroup_bycogroup_by exemplifies using a cross-language cogroup by key transform from a test expansion service.
go/examples/xlang/combinecombine exemplifies using a cross-language combine per key transform from a test expansion service.
go/examples/xlang/combine_globallycombine_globally exemplifies using a cross-language combine global transform from a test expansion service.
go/examples/xlang/flatten
go/examples/xlang/group_bygroup_by exemplifies using a cross-language group by key transform from a test expansion service.
go/examples/xlang/multi_input_outputmulti exemplifies using a cross-language transform with multiple inputs and outputs from a test expansion service.
go/examples/xlang/partitionpartition exemplifies using a cross-language partition transform from a test expansion service.
go/examples/xlang/sqlPrerequisites to run sql: –> [Required] Job needs to be submitted to a portable runner (--runner=universal) –> [Required] Endpoint of job service needs to be passed (--endpoint=<ip:port>) –> [Required] Endpoint of expansion service needs to be passed (--expansion_addr=<ip:port>) –> [Optional] Environment type can be LOOPBACK.
go/examples/xlang/wordcountwordcount exemplifies using a cross-language Count transform from a test expansion service to count words.
Version
v2.65.0 (latest)
Published
May 6, 2025
Platform
linux/amd64
Imports
4 packages
Last checked
1 day ago

Tools for package owners.