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 / abhay agrawal
Source--Tx--Target
In Tx have 5 Stage Variables:
PreSID
CurrSID
PreMarks
CurrMarks
Rank
CurrSID=>PreSID
Input Sid=>CurrSID
CurrMarks=>PreMarks
Input Mark=>CurrMarks
If CurrSID=PreSID then If CurrMarks=PreMarks then Rank Else Rank+1 Else 1=>Rank
Take Rank as output column, let me know if any clarificationneeded.
| Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
What is the importance of the exception activity in datastage?
What is the difference between datastage and datastage tx?
Why fact table is in normal form?
How can we improve performance of data stage jobs?
what should be ensure to run the sequence job so that if its get aborted in 10th job before 9job should get succeeded?
Define repository tables in datastage?
Define Data Stage?
What is difference between server jobs & parallel jobs?
AGGREGATOR default datatype
What is the use of hoursfromtime() function in transformer stage in datastage?
Define project in datastage?
CHANGE CAPTURE
tell me 5 situations when we r using oracle db stages like orecle connector, oracle enterprise
What is the different type of jobs in datastage?
How can we improve the performance in datastage?