tree: c62742314f01320056a367c51561af1aa22f7282 [path history] [tgz]
  1. testing/
  2. transforms/
  3. README.md
  4. regex_matches.yaml
  5. simple_filter.yaml
  6. simple_filter_and_combine.yaml
  7. wordcount_minimal.yaml
sdks/python/apache_beam/yaml/examples/README.md

Examples Catalog

This module contains a series of Beam YAML code samples that can be run using the command:

python -m apache_beam.yaml.main --pipeline_spec_file=/path/to/example.yaml

Wordcount

A good starting place is the Wordcount example under the root example directory. This example reads in a text file, splits the text on each word, groups by each word, and counts the occurrence of each word. This is a classic example used in the other SDK's and shows off many of the functionalities of Beam YAML.

Transforms

Examples in this directory show off the various built-in transforms of the Beam YAML framework.

Element-wise

These examples leverage the built-in mapping transforms including MapToFields, Filter and Explode. More information can be found about mapping transforms here.

Aggregation

These examples leverage the built-in Combine transform for performing simple aggregations including sum, mean, count, etc.

More information can be found about aggregation transforms here.