layout: section title: “Distinct” permalink: /documentation/transforms/java/aggregation/distinct/ section_menu: section-menu/documentation.html

Distinct

On some data sets, it might be more efficient to compute an approximate answer using ApproximateUnique, which also allows for determining distinct values for each key.

Examples

See BEAM-7703 for updates.

Related transforms

  • [Count]({{ site.baseurl }}/documentation/transforms/java/aggregation/count) counts the number of elements within each aggregation.
  • [ApproximateUnique]({{ site.baseurl }}/documentation/transforms/java/aggregation/approximateunique) estimates the number of distinct elements in a collection.