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
how to delete one row in target dataset
hi iam new to this tooliam cmpltied to know abt datastage so now iam in project tell me whole step by step what iam doing iwnt to go with exp so plz hlp me pals
To see hidden files in LINIX?
how to get sum of sal based on dept_no and then sum of all sal irrespective of dept_no in same sql. output:- 10, 200(sum of sal for dept_no 10), 5000(sum of all sal)
What are the functionalities of link collector?
What are the main features of datastage?
What is the difference between datastage and datastage tx?
What is the difference between validated and compiled in the datastage?
What are stage variables?
how to sort two columns in single job in datastage.
Is it possible to implement parallelism in Mainframe Jobs ? If Yes how ? If no why ?
What is job control?
What is the project in datastage?
what is the use of materialized view?
what is ds administrator used for?