package wordcount
import "github.com/apache/beam/sdks/v2/go/test/integration/wordcount"
Package wordcount contains transforms for wordcount.
Index ¶
- func CountWords(s beam.Scope, lines beam.PCollection) beam.PCollection
- func Format(s beam.Scope, counted beam.PCollection) beam.PCollection
- func WordCount(glob, hash string, size int) *beam.Pipeline
- func WordCountFromPCol(s beam.Scope, in beam.PCollection, hash string, size int)
Functions ¶
func CountWords ¶
func CountWords(s beam.Scope, lines beam.PCollection) beam.PCollection
CountWords is a composite transform that counts the words of a PCollection of lines. It expects a PCollection of type string and returns a PCollection of type KV<string,int>. The Beam type checker enforces these constraints during pipeline construction.
func Format ¶
func Format(s beam.Scope, counted beam.PCollection) beam.PCollection
Format formats a KV of a word and its count as a string.
func WordCount ¶
WordCount returns a self-validating wordcount pipeline.
func WordCountFromPCol ¶
WordCountFromPCol counts the words from a PCollection and validates it.
Source Files ¶
- Version
- v2.66.0 (latest)
- Published
- Jun 23, 2025
- Platform
- linux/amd64
- Imports
- 9 packages
- Last checked
- 57 minutes ago –
Tools for package owners.