CARVIEW |
Select Language
HTTP/2 200
server: Apache
last-modified: Sat, 19 Jul 2025 17:42:10 GMT
etag: "a4b8-63a4bc3199ef9-gzip"
content-encoding: gzip
access-control-allow-origin: *
content-security-policy: frame-src 'self' https://play.beam.apache.org/ https://www.youtube.com/ https://drive.google.com/ ;
content-type: text/html
via: 1.1 varnish, 1.1 varnish
accept-ranges: bytes
age: 0
date: Sat, 19 Jul 2025 18:10:45 GMT
x-served-by: cache-hel1410028-HEL, cache-bom4737-BOM
x-cache: MISS, MISS
x-cache-hits: 0, 0
x-timer: S1752948645.955740,VS0,VE481
vary: Accept-Encoding
strict-transport-security: max-age=31536000; includeSubDomains; preload
content-length: 8939
GroupByKey
GroupByKey
![]() |
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.
![]() |
Last updated on 2025/07/19
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!