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 / 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

file having these input and we have to get 3 output using same job Input 1 1 1 2 3 4 4 4 o/p1 o/p2 o/p3 1 1 2 2 1 3 3 1 4 4 4

887


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

1000


What are some prerequisites for datastage?

1041


What can we do with datastage director?

1164


What is the difference between the local container and shared container?

1042


What are the different common services in datastage?

1214


Is it possible to implement parallelism in Mainframe Jobs ? If Yes how ? If no why ?

2177


Describe the architecture of datastage?

950


How complex jobs are implemented in datstage to improve performance?

962


Define APT_CONFIG in Datastage?

1020


How you can fix the truncated data error in datastage?

1674


Differentiate between validated and Compiled in the Datastage?

1193


What are the types of views in datastage director?

1720


What is the purpose of interprocessor stage in server jobs?

2169


How do y read Sequential file from job control?

15798