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

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.

主站蜘蛛池模板: 德安县| 清镇市| 新蔡县| 新绛县| 泰宁县| 正蓝旗| 水城县| 马龙县| 唐海县| 邵东县| 霍林郭勒市| 广州市| 巴塘县| 老河口市| 宜良县| 喜德县| 西和县| 凌源市| 苗栗市| 长海县| 平邑县| 利辛县| 永善县| 镇巴县| 桃园市| 南川市| 浦城县| 保康县| 庄浪县| 泾阳县| 广东省| 阿拉尔市| 西丰县| 湘潭县| 博爱县| 丰台区| 威远县| 台东县| 金秀| 罗山县| 漳州市|