Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I have one task to generate rank for students based on their total marks
am able to generate rank for the students who are having high score as 1 and other 2 ....so on
but here my problem is if two or more student is having same total marks then i need to compare their subject wise marks and if subject wise are same then i need to compare other subject like so on
Appreciate for your help
Regards
rekha
OK, scrap what I said previously, there is a much easier way of doing this. Just use the tSortRow component and set the Criteria according to your rank priority (top to bottom). Then you will know that the first row out of this will be your top ranked individual, the last will be your bottom ranked. Use a tMap with a sequence to assign the rank.
Hi,
OK, the usecase is clear but can you give us a sample for input record and the corresponding expected result?
OK, this is more of an algorithm problem, than a Talend problem. Essentially you have several levels whereby a rank can be derived. As you have described, you start with one piece of data, but where that is the same you go down to a different level, where that is also the same, you go to another level. Why not start your ranking algorithm at the most granular level for everyone? Come up with a standardisation rule for your different ranking levels (between 1 to 10 or 1 to 1, etc) and then it should be relatively simple maths with a tSort component.
OK, scrap what I said previously, there is a much easier way of doing this. Just use the tSortRow component and set the Criteria according to your rank priority (top to bottom). Then you will know that the first row out of this will be your top ranked individual, the last will be your bottom ranked. Use a tMap with a sequence to assign the rank.
Hi rhall,
Thank you so much for this simple solution am trying a lot.now i understand where i did mistake.and i got output also
Thanks a lot.
Regards
bhagyarekha
@Talend65 can you raise a new question since it is not the same as the one here and it can get confusing for people searching for solutions when questions evolve.