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 / abhay agrawal
Source--Tx--Target
In Tx have 5 Stage Variables:
PreSID
CurrSID
PreMarks
CurrMarks
Rank
CurrSID=>PreSID
Input Sid=>CurrSID
CurrMarks=>PreMarks
Input Mark=>CurrMarks
If CurrSID=PreSID then If CurrMarks=PreMarks then Rank Else Rank+1 Else 1=>Rank
Take Rank as output column, let me know if any clarificationneeded.
Is This Answer Correct ? | 0 Yes | 0 No |
Post New Answer View All Answers
Demonstrate experience in maintaining quality process standards?
What is a merge?
What are the components of datastage?
Have you used Unstructured data?
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
project Steps,hits, Project level HArd things,Solved methods?
Difference between ‘validated ok’ and ‘compiled’ in data stage?
What is the difference between informatica and datastage?
What is orabulk stage?
What are the different type of jobs in datastage?
Can you explain how could anyone drop the index before loading the data in target in datastage?
how to read 100 records at a time in source a) hw is it fr metadata Same and b) if metadata is nt same?
Terminate Activity
Differentiate between hash file and sequential file?
Why do you need stage variables?