Shuffle avatar

Shuffle

1 version
Open in App

Shuffle

Groups incoming pairs by key, emitting each key together with the list of values that shared it.

Use this when

  • You are aggregating tagged sensor or telemetry readings by type.
  • You need to batch values by a partition key before downstream reduction or analysis.
  • You want a lightweight group-by without writing a custom aggregation component.

What it does

Consumes (K, V) pairs and groups them by key. Emits (K, [V]) for each distinct key. Inputs ("a", 1) ("b", 2) ("a", 3) ("b", 4) ("a", 5) produce ("a", [1, 3, 5]) ("b", [2, 4]).

Inputs

TypeDescription
[(K, V)]A list of keyed pairs.

Outputs

TypeDescription
[(K, [V])]One entry per distinct key, values grouped.

Parameters

This transformation takes no parameters.

Works best with

  • Sensor network components that tag readings with a type or source ID.
  • Downstream reducers, averagers, or per-group analytics.

Caveats

  • Requires a finite input list — will not group across unbounded streams without upstream batching.
  • Value order within each group follows input order but is not otherwise guaranteed across groups.

Versions

  • 24a36969linuxTransformation