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


Please Help Members By Posting Answers For Below Questions

Explain how a source file is populated?

752


What are the components of datastage?

635


What are the different options associated with dsjob command?

924


How can we perform the 2nd time extraction of client database without accepting the data which is already loaded in first time extraction?

1688


Differentiate between validated and Compiled in the Datastage?

627






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.

2420


how to connect source to db?generally what r stages u used? how to find the data is having delimiter format?

1908


What are the functionalities of link collector?

617


for example You have One Table with 4 Columns (Mgr ID, Department ID, Salary, Employee ID). Can you find out the Average Salary and Number of Employee present per Department and Mgr

760


Hi All , in PX Job I have passed 4 Parameters and when i run the same job in sequence i dont want to use those parameters , is this possible if yes then how

1111


what is 'reconsideration error' and how can i respond to this error and how to debug this

2105


How do you reject records in a transformer?

616


How to implement complex jobs in data stage?

602


What is the difference between datastage and informatica?

602


Explain datastage architecture?

803