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

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.

主站蜘蛛池模板: 昂仁县| 安乡县| 腾冲县| 清苑县| 临潭县| 夏河县| 溆浦县| 武平县| 平利县| 营山县| 宁陕县| 大同县| 云阳县| 塔河县| 广昌县| 宜兰市| 河津市| 平江县| 崇阳县| 孟村| 大丰市| 隆化县| 县级市| 方山县| 拉孜县| 鄂州市| 清水县| 赣榆县| 琼中| 博兴县| 申扎县| 凉城县| 中方县| 乳源| 嵩明县| 繁昌县| 新建县| 桑植县| 江阴市| 彭水| 彰武县|