Page 1 of 1

Rank

Posted: Mon Oct 20, 2008 5:43 pm
by Nagaraj
Hi There,
Can anyone please tell me is there any Rank function available in datastage.
or is there any way to achieve this?

thanks

Posted: Mon Oct 20, 2008 6:16 pm
by ray.wurlod
RANK is a display function. It is not the purpose of an ETL tool to display anything. Therefore the answer is NO.

Posted: Mon Oct 20, 2008 6:20 pm
by Nagaraj
Yes i got it Ray, But what is there is a requirement for me to populate one of the columns in the table with Ranks?
Bcos i see here we have many many stages which are doing similar operations. why didnt IBm make one stage for ranking.

Posted: Mon Oct 20, 2008 7:14 pm
by ray.wurlod
Because you can't do rank until all rows have been processed. That's why it's not an ETL function. ETL is best performed as a stream of data.

A second reason is that there is no one standard for the handling of tied ranks. Nonparametric statistics text books devote many pages to alternative strategies that you can use.

There is nothing whatsoever to stop you from either writing your own stage or developing a technique for ranks with stage variables in a Transformer stage, but you have to make some decisions first, both about handling of tied ranks and of the format of output. And, of course, you need to process the data twice (even if the first is only sorting).

Posted: Mon Oct 20, 2008 8:11 pm
by Nagaraj
Why not? we will be doing rank based on a certain column value.
why cant we have one stage which takes this column values in cache sort it and assign ranks and release in the data streams,
I Apologize if have said anything wrong technically and please correct me if i have said anything wrong.

Posted: Mon Oct 20, 2008 8:37 pm
by ray.wurlod
Of course you can, and I said so. But there's nothing out of the box - either you write your own stage (probably a Build stage) or you use stage variables in a Transformer stage (bearing in mind all I've already said about handling tied ranks) to process sorted data.

One of the difficulties of not having premium membership is that you can't read everything I write.

Posted: Mon Oct 20, 2008 8:41 pm
by Nagaraj
Okay thanks i got it...! using stage variables i can handle and define the ranks.

Posted: Mon Oct 20, 2008 8:48 pm
by Nagaraj
Just a quick question, anytime the membership is coming to 50$ soon?

Posted: Mon Oct 20, 2008 11:23 pm
by ray.wurlod
That's not something that's under my control but, as I understand it, that price was purely an introductory offer and won't be repeated. The current price is still less than 30c per day.