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
What is apt_config in datastage?
file having these input and we have to get 3 output using same job Input 1 1 1 2 3 4 4 4 o/p1 o/p2 o/p3 1 1 2 2 1 3 3 1 4 4 4
how to write server Routine coding?
how to abort the job its matain duplicates?
Explain connectivity between datastage with datasources?
what is the use of skid in reporting?
What are datastage sequences?
What steps should be taken to improve Datastage jobs?
What is the use of datastage designer?
What are the types of hashed files in data stage
what is ds administrator used for?
If we take 2 tables(like emp and dept),we use join stage and how to improve the performance?
What are sequencers?
Explain usage analysis in datastage?
How one source columns or rows to be loaded in to two different tables?