Dense Rank function in talend

Four Stars

Dense Rank function in talend

BI want to know how to use dense rank in this condition.if highest Marks having 3rows and lowest marks also 3 rows then how to find out that one.


Accepted Solutions
Sixteen Stars

Re: Dense Rank function in talend

I may have missed a setting in a component (if I have, I'd be interested to know about this) but I do not believe this functionality has been implemented. But it is very easy to implement if you use a tSortRow and a tMap. The tSortRow is self explanatory, but the tMap is a little more complicated to understand. In a tMap you can create tMap variables whic are processed from the top to the bottom in a strict order, they also keep their values between rows. Using this, we can keep track of when values change and implement a simple addition to a ranking number when the values change from the last row. This allows us to implement a dense rank. I have knocked up a brief example in Talend 6.2.1.

 


All Replies
Sixteen Stars

Re: Dense Rank function in talend

I may have missed a setting in a component (if I have, I'd be interested to know about this) but I do not believe this functionality has been implemented. But it is very easy to implement if you use a tSortRow and a tMap. The tSortRow is self explanatory, but the tMap is a little more complicated to understand. In a tMap you can create tMap variables whic are processed from the top to the bottom in a strict order, they also keep their values between rows. Using this, we can keep track of when values change and implement a simple addition to a ranking number when the values change from the last row. This allows us to implement a dense rank. I have knocked up a brief example in Talend 6.2.1.