layout: section title: “ApproximateQuantiles” permalink: /documentation/transforms/java/aggregation/approximatequantiles/ section_menu: section-menu/documentation.html
ApproximateQuantiles
Examples
Example: to compute the quartiles of a PCollection
of integers, we would use 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.
Related transforms
- [ApproximateUnique]({{ site.baseurl }}/documentation/transforms/java/aggregation/approximateunique) estimates the number of distinct elements or distinct values in key-value pairs
- [Combine]({{ site.baseurl }}/documentation/transforms/java/aggregation/combine)