Apache Beam Go SDK Quickstart
Set up your environment
The Beam SDK for Go requires
go version 1.10 or newer. It can be downloaded here. Check that you have version 1.10 by running:
$ go --version
Get the SDK and the examples
The easiest way to obtain the Apache Beam Go SDK is via
$ go get -u github.com/apache/beam/sdks/go/...
For development of the Go SDK itself, see BUILD.md for details.
The Apache Beam examples directory has many examples. All examples can be run by passing the required arguments described in the examples.
For example, to run
$ go install github.com/apache/beam/sdks/go/examples/wordcount $ wordcount --input <PATH_TO_INPUT_FILE> --output counts
$ go install github.com/apache/beam/sdks/go/examples/wordcount $ wordcount --input gs://dataflow-samples/shakespeare/kinglear.txt \ --output gs://<your-gcs-bucket>/counts \ --runner dataflow \ --project your-gcp-project \ --temp_location gs://<your-gcs-bucket>/tmp/ \ --worker_harness_container_image=apache-docker-beam-snapshots-docker.bintray.io/beam/go:20180515
- Learn more about the Beam SDK for Go and look through the godoc.
- Walk through these WordCount examples in the WordCount Example Walkthrough.
- Dive in to some of our favorite articles and presentations.
- Join the Beam users@ mailing list.
Please don’t hesitate to reach out if you encounter any issues!