Takes a comparison function and the desired number of quantiles n, either globally or per-key. Using an approximation algorithm, it returns the minimum value, n-2 intermediate values, and the maximum value.
Example: to compute the quartiles of a
PCollection of integers, we
ApproximateQuantiles.globally(5). This will produce a list
containing 5 values: the minimum value, Quartile 1 value, Quartile 2
value, Quartile 3 value, and the maximum value.
- ApproximateUnique estimates the number of distinct elements or distinct values in key-value pairs
Last updated on 2023/12/03
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!