Page 1 of 1
To populate top five values
Posted: Wed Nov 26, 2008 5:25 am
by nani0907
Hi all
I have need to populate top five decimal values after doing validations for which i have used transformer stage.
Pleae share how do handle this .
Thanks in advance
Re: To populate top five values
Posted: Wed Nov 26, 2008 5:27 am
by ArndW
nani0907 wrote:...populate top five decimal values...
Could you explain what you mean by that? Is it the rows with the 5 largest values in one column, or 5 decimal columns and getting the highest among them or some other action?
Posted: Wed Nov 26, 2008 5:30 am
by nani0907
It is to populate five largest decimal values.
Posted: Wed Nov 26, 2008 5:32 am
by ArndW
I am afraid that I still don't quite understand, would it be possible to give a short simplified example of what you wish to do?
Posted: Wed Nov 26, 2008 5:45 am
by nani0907
I getting the data as below
column A Column B
1 20.9
2 10.8
3 27.4
4 15.3
5 32.1
6 15.7
Output to be generted only for top five column B values in descending order
Coumn a Column B
5 32.1
3 27.4
1 20.9
6 15.7
4 15.3
Please help me out .
Posted: Wed Nov 26, 2008 6:01 am
by hamzaqk
rank the columns and then based on column ranking filter only the first five records.
p.s i am sure your next question would be how to rank. for that search the forum :D
Posted: Wed Nov 26, 2008 6:08 am
by ArndW
Sort the data by descending value, then limit the output to the first 5 rows.
Posted: Wed Nov 26, 2008 7:24 am
by nani0907
How to limit the output to the first 5 rows
Posted: Wed Nov 26, 2008 8:38 am
by ArndW
single-thread a transform stage (sequential as opposed to parallel, or a 1-node configuration) and then put a constraint "@INROWNUM < 6" in.
Posted: Wed Nov 26, 2008 8:51 am
by nani0907
Thanks a lot
Iam able to get required output
Posted: Wed Nov 26, 2008 8:53 am
by nani0907
Thanks a lot
Iam able to get required output