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
Why fact table is in normal form?
1.what is repartionoing technique? 2.what deliverables transferred to client using datastage? 3.how to write loop statements using nested loop sequence?
tell me 5 situations when we r using oracle db stages like orecle connector, oracle enterprise
What are the different kinds of views available in a datastage director?
Hi guys, Please design a job for dis requirement with derivation(solution). my source table like dis. emp_no qualification 1 a 1 c 2 a 3 c 3 b To loaded to target like dis emp_no qualification 1 b 2 b 2 c 3 a my requirement is every employer have three qualifications i.e a,b and c. what qualification missed in source table that will be move to target systems. Hope u got it the requirement. Right Thanks.
Where the datastage stored his repository?
Name the different sorting methods in datastage.
Explain connectivity between datastage with datasources?
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
How many Key we can define in remove duplicate stage?
What are the various kinds of containers available in datastage?
What is ds designer?
In Datastage, how you can fix the truncated data error?
Explain the importance of surrogate key in data warehousing?
Name the different types of Lookups in Datastage?