beam: github.com/apache/beam/sdks/go/pkg/beam/transforms/stats Index | Files

package stats

import "github.com/apache/beam/sdks/go/pkg/beam/transforms/stats"

Package stats contains transforms for statistical processing.

Index

Package Files

count.go max.go max_switch.go mean.go min.go min_switch.go stats.shims.go sum.go sum_switch.go util.go util_gen.go

func Count Uses

func Count(s beam.Scope, col beam.PCollection) beam.PCollection

Count counts the number of elements in a collection. It expects a PCollection<T> as input and returns a PCollection<KV<T,int>>. T's encoding must be a well-defined injection.

func Max Uses

func Max(s beam.Scope, col beam.PCollection) beam.PCollection

Max returns the maximal element in a PCollection<A> as a singleton PCollection<A>. It can only be used for numbers, such as int, uint16, float32, etc.

For example:

col := beam.Create(s, 1, 11, 7, 5, 10)
max := stats.Max(s, col)   // PCollection<int> with 11 as the only element.

func MaxPerKey Uses

func MaxPerKey(s beam.Scope, col beam.PCollection) beam.PCollection

MaxPerKey returns the maximal element per key in a PCollection<KV<A,B>> as a PCollection<KV<A,B>>. It can only be used for numbers, such as int, uint16, float32, etc.

func Mean Uses

func Mean(s beam.Scope, col beam.PCollection) beam.PCollection

Mean returns the arithmetic mean (or average) of the elements in a collection. It expects a PCollection<A> as input and returns a singleton PCollection<float64>. It can only be used for numbers, such as int, uint16, float32, etc.

For example:

col := beam.Create(s, 1, 11, 7, 5, 10)
mean := stats.Mean(s, col)   // PCollection<float64> with 6.8 as the only element.

func MeanPerKey Uses

func MeanPerKey(s beam.Scope, col beam.PCollection) beam.PCollection

MeanPerKey returns the arithmetic mean (or average) for each key of the elements in a collection. It expects a PCollection<KV<A,B>> as input and returns a PCollection<KV<A,float64>>. It can only be used for numbers, such as int, uint16, float32, etc.

func Min Uses

func Min(s beam.Scope, col beam.PCollection) beam.PCollection

Min returns the minimal element in a PCollection<A> as a singleton PCollection<A>. It can only be used for numbers, such as int, uint16, float32, etc.

For example:

col := beam.Create(s, 1, 11, 7, 5, 10)
min := stats.Min(s, col)   // PCollection<int> with 1 as the only element.

func MinPerKey Uses

func MinPerKey(s beam.Scope, col beam.PCollection) beam.PCollection

MinPerKey returns the minimal element per key in a PCollection<KV<A,B>> as a PCollection<KV<A,B>>. It can only be used for numbers, such as int, uint16, float32, etc.

func Sum Uses

func Sum(s beam.Scope, col beam.PCollection) beam.PCollection

Sum returns the sum of the elements in a PCollection<A> as a singleton PCollection<A>. It can only be used for numbers, such as int, uint16, float32, etc.

For example:

col := beam.Create(s, 1, 11, 7, 5, 10)
sum := stats.Sum(s, col)   // PCollection<int> with 34 as the only element.

func SumPerKey Uses

func SumPerKey(s beam.Scope, col beam.PCollection) beam.PCollection

SumPerKey returns the sum of the values per key in a PCollection<KV<A,B>> as a PCollection<KV<A,B>>. It can only be used for value numbers, such as int, uint16, float32, etc.

Package stats imports 6 packages (graph) and is imported by 7 packages. Updated 2019-01-20. Refresh now. Tools for package owners.