Top N Assembly


Number of input and output link

Number of input link : One
Number of output link : One

Top N Assembly () is used to select the top N records from each local partition based on a specified sorting criterion.

This assembly operates locally on each partition, meaning it does not perform a global shuffle across the entire dataset.

How It Works

Key Characteristics

Example

Input Data (2 Partitions)
Partition 1
    ID	Score
    ---------
    A	95
    B	80
    C	70
Partition 2
    ID	Score
    ---------
    D	90
    E	85
    F	60

Configuration

Output

Partition 1 Partition 2

Common Use Cases

Important Notes

Summary

The Top N Assembly selects the highest-ranked N records within each local partition, providing an efficient way to reduce data early in distributed processing pipelines, though it does not produce globally ranked results by itself.

Supported Engines

Map
Reduce
Spark 1.x
RDD
Spark 2.x
RDD
Spark 2.x
Dataset
Apache Beam
2.29.0 Batch
Apache Beam
2.29.0 Streaming
Apache Flink
1.12.0 Batch
Apache Flink
1.12.0 Streaming
Apache Tez
0.9.1
PySpark