Suppose, I have a dataset consisting of students name, class and total marks. I want to compute the rank of the students within the class the students belong to. Is it possible to compute the rank?
Hello Ragita, you can use ‘Window Ranking’ processor to compute ranks within a group.
Suppose you have a dataset like below:
Now create a workflow similar to below:
The configuration of 'Window Ranking' processor will be as follows:
- Choose ‘Class’ as PARTITION column. If you want to define groups by multiple columns then give these column name separated by ‘,’ (comma).
- Choose ‘TotalScore’ as the ORDERBY column. In this case you, likely, assign low rank value to higher marks, that is why the keyword ‘DESC’.
After the execution you would likely have the following output: