# tTopBy

Groups and sorts data and outputs several rows from the first one of the data in each group.

tTopBy groups the input data by applying user-defined keys, sorts records in each group and sends to its following component a given number of first rows of the sorted records.

For more technologies supported by Talend, see [Talend components](https://help.qlik.com/talend/r/en-US/7.3/components/processing).

Depending on the Talend product you are using, this component can be used in one, some or all of the following Job frameworks:

* Spark Batch: see [tTopBy properties for Apache Spark Batch](https://help.qlik.com/talend/en-US/components/7.3/processing/ttopby-properties-for-apache-spark-batch).

  The component in this framework is available in all Talend products with Big Data and Talend Data Fabric.

* Spark Streaming: see [tTopBy properties for Apache Spark Streaming](https://help.qlik.com/talend/en-US/components/7.3/processing/ttopby-properties-for-apache-spark-streaming).

  This component is available in Talend Real Time Big Data Platform and Talend Data Fabric.

### In this section

* [tTopBy properties for Apache Spark Batch](https://help.qlik.com/talend/en-US/components/7.3/processing/ttopby-properties-for-apache-spark-batch)
* [tTopBy properties for Apache Spark Streaming](https://help.qlik.com/talend/en-US/components/7.3/processing/ttopby-properties-for-apache-spark-streaming)