GroupByKey
Pydoc |
Takes a keyed collection of elements and produces a collection where each element consists of a key and all values associated with that key.
See more information in the Beam Programming Guide.
Examples
Example 1: In the following example, we create a pipeline with a PCollection
of produce keyed by season.
We use GroupByKey
to group all the produce for each season.
Example 2:
Related transforms
- GroupBy for grouping by arbitrary properties of the elements.
- CombinePerKey for combining all values associated with a key to a single result.
- CoGroupByKey for multiple input collections.
Pydoc |
Last updated on 2024/11/14
Have you found everything you were looking for?
Was it all useful and clear? Is there anything that you would like to change? Let us know!