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 process model?
What is the difference between hashfile and sequential file?
How many areas for files does datastage have?
What is merge stage?
Describe routines in datastage? Enlist various types of routines.
What are the primary usages of datastage tool?
EXPLAIN SCD
What are the various kinds of containers available in datastage?
Define oconv () and iconv () functions in datastage?
How one source columns or rows to be loaded in to two different tables?
To see hidden files in LINIX?
How you can fix the truncated data error in datastage?
What a datastage macro?
Highlight the main features of datastage?
What is the difference between informatica and datastage?