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 process model?

1986


What is the difference between hashfile and sequential file?

1266


How many areas for files does datastage have?

1156


What is merge stage?

1320


Describe routines in datastage? Enlist various types of routines.

1016


What are the primary usages of datastage tool?

1075


EXPLAIN SCD

1413


What are the various kinds of containers available in datastage?

1048


Define oconv () and iconv () functions in datastage?

1417


How one source columns or rows to be loaded in to two different tables?

1131


To see hidden files in LINIX?

1532


How you can fix the truncated data error in datastage?

1798


What a datastage macro?

1065


Highlight the main features of datastage?

1164


What is the difference between informatica and datastage?

1235