Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

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


Please Help Members By Posting Answers For Below Questions

What is the importance of the exception activity in datastage?

1053


What is the difference between datastage and datastage tx?

1047


Why fact table is in normal form?

1213


How can we improve performance of data stage jobs?

999


what should be ensure to run the sequence job so that if its get aborted in 10th job before 9job should get succeeded?

1371


Define repository tables in datastage?

1140


Define Data Stage?

1074


What is difference between server jobs & parallel jobs?

1020


AGGREGATOR default datatype

1435


What is the use of hoursfromtime() function in transformer stage in datastage?

1047


Define project in datastage?

1085


CHANGE CAPTURE

1292


tell me 5 situations when we r using oracle db stages like orecle connector, oracle enterprise

3102


What is the different type of jobs in datastage?

951


How can we improve the performance in datastage?

1089