Hi Friends,
I have a input data like,
class_id Marks
101 50
101 60
101 40
102 90
102 35
And i want my output data like
class_id Marks Rank
101 50 2
101 60 1
101 40 3
102 90 1
102 35 2
how to do this in datastage?
Answer Posted / indu
Input->Sort1->Sort2->Trnsformer->Output
Sort1-->Declare class_id and Marks as key column and sort
in descding order.
Sort2-->Declare class_id and Marks as key column(Sort Mode
to Dont sort previously sorted for both) and set clustered
key change column to true.
Otuput for Sort 2 will be
class_id Marks Rank
102 90 1
102 35 0
101 60 1
101 50 0
101 40 0
In the Transformer declare stage variable temp and
initialize to o
Derive temp--> If Rnak=1 then Rank else temp+1
Derive output columns as --->
class_id ---> class_id
Marks ----> Marks
Rank----> temp
| Is This Answer Correct ? | 13 Yes | 10 No |
Post New Answer View All Answers
What is active and passive stage?
Name the different sorting methods in datastage.
how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?
What is process model?
What is the difference between server job and parallel jobs?
What is a merge?
Can you highlight the main features of ibm infosphere information server?
What is the differentiate between data file and descriptor file?
What are the components of datastage?
Differentiate between hash file and sequential file?
What is quality stage?
CHANGE CAPTURE
client know skid info?
What are the types of hashed files in data stage
in oracle target stage when we use load option and when we use upsert option?