minimal_wordcount

command
v2.60.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 14, 2024 License: Apache-2.0, BSD-3-Clause, MIT Imports: 10 Imported by: 0

Documentation

Overview

minimal_wordcount is an example that counts words in King Lear, by William Shakespeare.

This example is the first in a series of four successively more detailed 'word count' examples. Here, for simplicity, we don't show any error-checking or argument processing, and focus on construction of the pipeline, which chains together the application of core transforms.

Next, see the wordcount pipeline, then the debugging_wordcount pipeline, and finally the windowed_wordcount pipeline, for more detailed examples that introduce additional concepts.

Concepts:

  1. Registering transforms with Beam.
  2. Reading data from text files
  3. Specifying 'inline' transforms
  4. Counting items in a PCollection
  5. Writing data to text files

No arguments are required to run this pipeline. It will be executed with the direct runner. You can see the results in the output file named "wordcounts.txt" in your current working directory.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL