官术网_书友最值得收藏!

Sorter transformation

Sorter transformation is used to sort the data in ascending or descending order based on single key or multiple keys. A sample mapping showing sorter transformation is indicated in the following screenshot:

In the preceding mapping, we wish to sort the data based on the DEPARTMENT_ID field. To achieve this, mark the key port for the DEPARTMENT_ID columns in the sorter transformation, and select from the drop-down you wish to have Ascending or Descending sorting as shown in the following screenshot:

If you wish to sort the data on multiple columns, check the Key ports corresponding to the required port.

Apart from ordering the data in ascending or descending order, you can also use sorter transformation to remove duplicates from the data using the distinct option in the properties. Sorter can remove duplicates only if the complete record is duplicate, and not only a particular column. To remove the duplicate, check the Distinct option in sorter transformation as shown in the following screenshot:

Sorter transformation accepts the data in a row-wise manner and stores the data in cache internally. Once the data in received completely, it sorts the data in ascending or descending order based on the condition and sends the data to the output port.

主站蜘蛛池模板: 安福县| 神木县| 吉木萨尔县| 孝感市| 无为县| 乡城县| 新晃| 博兴县| 玉溪市| 阿拉善左旗| 旌德县| 息烽县| 镇原县| 双峰县| 永兴县| 安西县| 曲沃县| 桐乡市| 临泽县| 葵青区| 岑溪市| 玉门市| 霍城县| 卢湾区| 宁城县| 仁化县| 霍林郭勒市| 鞍山市| 革吉县| 凤台县| 沙河市| 象州县| 共和县| 四川省| 保山市| 珲春市| 普安县| 广元市| 蓬安县| 沂源县| 旺苍县|