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 / anki_sri
Src>> Sort1 >> Sort2 >> Transfrmr >> Trgt
Sort1 --> sort with class_id and marks as well.
Sort2 --> declare key as id and select Dont Sort(Previously Sorted) and set create cluster key change column as True.
Transfrmr --> set two stage variables.
StageVar1=If Clusterkeychange=1 then Clusterkeychange else StageVar+1
StageVar=StageVar1
Create a new row as rank in transfrmr output and map StageVar1 to rank
Is This Answer Correct ? | 3 Yes | 8 No |
Post New Answer View All Answers
disign the complex job in u r project?(they are aksing only complex job design and then data flow...)
What is developer responsibilities in UAT (user acceptance testing and Post implementation phase?
What are the components of ascential data stage?
How many types of stage?
What is the purpose of pivot stage?
what is the difference between == and eq in UNIX shell scripting?
What are the functionalities of link partitioner?
What is the precedence of stage variables,derivations, and constraints?
What is datastage engine?
How to reverse the string using unix?
What is difference between join, merge and lookup stage?
What is difference between server jobs & parallel jobs?
How to implement complex jobs in data stage?
How and where you used hash file?
What can we do with datastage director?