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
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
What is the use of hoursfromtime() function in transformer stage in datastage?
What are some prerequisites for datastage?
What can we do with datastage director?
What is the difference between the local container and shared container?
What are the different common services in datastage?
Is it possible to implement parallelism in Mainframe Jobs ? If Yes how ? If no why ?
Describe the architecture of datastage?
How complex jobs are implemented in datstage to improve performance?
Define APT_CONFIG in Datastage?
How you can fix the truncated data error in datastage?
Differentiate between validated and Compiled in the Datastage?
What are the types of views in datastage director?
What is the purpose of interprocessor stage in server jobs?
How do y read Sequential file from job control?