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

Rank transformation

Rank transformation is used to get the top or bottom specific number of records. Consider that you need to take the top five salaried employees from the EMPLOYEE table; you can use rank transformation and define the property. A sample mapping indicating the Rank transformation is shown in the following screenshot:

When you create a Rank transformation, a default output port RANKINDEX comes with the transformation. It is not mandatory to use the RANKINDEX port. We have connected the RANKINDEX port to the target as we wish to denote the rank of the employees based on their SALARY.

When you use Rank transformation, you need to define the port on which you wish to rank the data. As shown in the following screenshot, we have ranked the data based on SALARY:

You cannot rank the data on multiple ports.

Also, you need to define either the Top or Bottom option and the number of records you wish to rank in the Properties tab. In our case, we have selected Top and 5 numbers to implement the scenario as shown in the following screenshot:

Rank transformation accepts the data in a row-wise manner and stores the data in cache. Once the data in received completely, it checks the data based on the condition and sends the data to the output port.

Rank transformation allows you to get the data based on a particular group. In the next section, we will talk about the group by key present in Rank transformation.

主站蜘蛛池模板: 盈江县| 贞丰县| 新龙县| 无锡市| 阜新市| 孝义市| 张家界市| 浦县| 商丘市| 肇州县| 台中市| 南川市| 寻乌县| 个旧市| 崇文区| 兴文县| 南城县| 温宿县| 滦平县| 玛纳斯县| 西华县| 伊宁市| 金门县| 兴业县| 江孜县| 辽中县| 西丰县| 梨树县| 昆山市| 偃师市| 泸水县| 两当县| 迁西县| 焉耆| 资兴市| 麟游县| 定结县| 荔浦县| 自治县| 黄平县| 金门县|