Latest
A transform and Combine.CombineFn
for computing the latest element in a collection.
Latest.globally()
takes a collection of values and produces the collection containing the single value with the latest implicit timestamp.Latest.perKey()
takes a collection of key value pairs, and returns the latest value for each key, according to the implicit timestamp.
For elements with the same timestamp, the output element is arbitrarily selected.
Examples
Example 1: Compute the latest value for each session
Example 2:
Related transforms
- Reify converts between explicit and implicit form of various Beam values
- WithTimestamps assigns timestamps to all the elements of a collection
Last updated on 2024/12/30
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!