examples/ directory

Directories

PathSynopsis
go/examples/complete
go/examples/complete/autocomplete
go/examples/contains
go/examples/cookbook
go/examples/cookbook/combine
go/examples/cookbook/filter
go/examples/cookbook/join
go/examples/cookbook/max
go/examples/cookbook/tornadoestornadoes is an example that reads the public samples of weather data from BigQuery, counts the number of tornadoes that occur in each month, and writes the results to BigQuery.
go/examples/debugging_wordcountdebugging_wordcount is an example that verifies word counts in Shakespeare and includes Beam best practices.
go/examples/fhirio
go/examples/fhirio/importimport is a pipeline example using the fhirio connector to bulk import FHIR resources from GCS into a given FHIR store.
go/examples/fhirio/read_write_pubsubread_write_pubsub is a pipeline example using the fhirio connector to read FHIR resources from GCS, write them to a GCP FHIR store, and, if a PubSub topic is provided, read the written resources from the FHIR store and log them based on the PubSub notifications about store updates.
go/examples/forestforest is an example that shows that pipeline construction is normal Go code -- the pipeline "forest" is created recursively and uses a global variable -- and that a pipeline may contain non-connected parts.
go/examples/grades
go/examples/kafkataxi is an example using a cross-language Kafka pipeline to write and read to Kafka.
go/examples/large_wordcountlarge_wordcount is an example that demonstrates a more complex version of a wordcount pipeline.
go/examples/minimal_wordcountminimal_wordcount is an example that counts words in King Lear, by William Shakespeare.
go/examples/multioutmultiout is a wordcount variation that uses a multi-outout DoFn and writes 2 output files.
go/examples/native_wordcapnative_wordcap is a toy streaming pipeline that uses PubSub.
go/examples/native_wordcap/nativepubsubioPackage nativepubsubio contains a Golang implementation of streaming reads and writes to PubSub.
go/examples/pingpong
go/examples/readavroreadavro is a simple Avro read/write Example This example uses a 500 Byte sample avro file [twitter.avro] download here: https://s3-eu-west-1.amazonaws.com/daidokoro-dev/apache/twitter.avro
go/examples/slowly_updating_side_inputslowly_updating_side_input is an example pipeline demonstrating the pattern described at https://beam.apache.org/documentation/patterns/side-inputs/.
go/examples/snippetsPackage snippets contains code used in the Beam Programming Guide as examples for the Apache Beam Go SDK.
go/examples/streaming_wordcapstreaming_wordcap is a toy streaming pipeline that uses PubSub.
go/examples/stringsplitAn example of using a Splittable DoFn in the Go SDK with a portable runner.
go/examples/timer_wordcaptimer_wordcap is a toy streaming pipeline that demonstrates the use of State and Timers.
go/examples/wasmwasm is a simple example that loads and executes a wasm file function.
go/examples/windowed_wordcountwindowed_wordcount counts words in text, and can run over either unbounded or bounded input collections.
go/examples/wordcountwordcount is an example that counts words in Shakespeare and demonstrates Beam best practices.
go/examples/xlangPackage xlang contains functionality for testing cross-language transforms.
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.
go/examples/yatzyyatzy is an implementation of https://en.wikipedia.org/wiki/Yatzy that shows that pipeline construction is normal Go code.
Version
v2.65.0 (latest)
Published
May 6, 2025
Platform
linux/amd64
Last checked
1 day ago

Tools for package owners.