apache_beam.transforms.combiners module¶
A library of basic combiner PTransform subclasses.
-
class
apache_beam.transforms.combiners.Mean[source]¶ Bases:
objectCombiners for computing arithmetic means of elements.
-
class
Globally(label=None)[source]¶ Bases:
apache_beam.transforms.ptransform.PTransformcombiners.Mean.Globally computes the arithmetic mean of the elements.
-
class
PerKey(label=None)[source]¶ Bases:
apache_beam.transforms.ptransform.PTransformcombiners.Mean.PerKey finds the means of the values for each key.
-
class
-
class
apache_beam.transforms.combiners.Count[source]¶ Bases:
objectCombiners for counting elements.
-
class
Globally(label=None)[source]¶ Bases:
apache_beam.transforms.ptransform.PTransformcombiners.Count.Globally counts the total number of elements.
-
class
PerKey(label=None)[source]¶ Bases:
apache_beam.transforms.ptransform.PTransformcombiners.Count.PerKey counts how many elements each unique key has.
-
class
PerElement(label=None)[source]¶ Bases:
apache_beam.transforms.ptransform.PTransformcombiners.Count.PerElement counts how many times each element occurs.
-
class
-
class
apache_beam.transforms.combiners.Top[source]¶ Bases:
objectCombiners for obtaining extremal elements.
-
static
Of(*args, **kwargs)¶
-
static
PerKey(*args, **kwargs)¶
-
static
Largest(*args, **kwargs)¶
-
static
Smallest(*args, **kwargs)¶
-
static
LargestPerKey(*args, **kwargs)¶
-
static
SmallestPerKey(*args, **kwargs)¶
-
static
-
class
apache_beam.transforms.combiners.Sample[source]¶ Bases:
objectCombiners for sampling n elements without replacement.
-
static
FixedSizeGlobally(*args, **kwargs)¶
-
static
FixedSizePerKey(*args, **kwargs)¶
-
static
-
class
apache_beam.transforms.combiners.ToList(label='ToList')[source]¶ Bases:
apache_beam.transforms.ptransform.PTransformA global CombineFn that condenses a PCollection into a single list.
-
class
apache_beam.transforms.combiners.ToDict(label='ToDict')[source]¶ Bases:
apache_beam.transforms.ptransform.PTransformA global CombineFn that condenses a PCollection into a single dict.
PCollections should consist of 2-tuples, notionally (key, value) pairs. If multiple values are associated with the same key, only one of the values will be present in the resulting dict.