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

souce file having the columns like
name company
krish IBM
pooja TCS
nandini WIPRO
krish IBM
pooja TCS
if first row will be repeat i want the result like this
name company count
krish IBM 1
pooja TCS 1
nandini WIPRO 1
krish IBM 2
pooja TCS 2


Answer Posted / srinivas

Use below stage variables

create 4 stage variables

STG1 =NAME:COMPANY

STG2=1

STG3= IF STG1:STG4 THEN STG3+1 ELSE STG2

STG4= STG1

create extra column for store this ranks.


After this stage use the sort stage to sort the data based on ranking column.

Then will get the exact output what we are looking.

krish IBM 1
pooja TCS 1
nandini WIPRO 1
krish IBM 2
pooja TCS 2

Is This Answer Correct ?    1 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How many types of hash files are there?

1162


What is a folder? Difference types of stages?

1154


If we take 2 tables(like emp and dept),we use join stage and how to improve the performance?

2026


In Datastage, how you can fix the truncated data error?

1144


Can you explain link buffering?

1157


Difference between ‘validated ok’ and ‘compiled’ in data stage?

1246


What are the different layers in the information server architecture?

1116


Distinguish between informatica & datastage. Which one would you choose and why?

992


What are constraints and derivations?

1150


Hi , Can anyone give few examples of scenarios and there corresponding design in datastage..i am new to this tool...confused in design while my manager asking to design the job.. Please post the URL if there..so i can go through it.. Thanks in advance...

4179


how to sort two columns in single job in datastage.

2884


Define ds designer?

1252


What is the precedence of stage variables,derivations, and constraints?

1063


What are the areas of application?

1127


What are some different alternative commands associated with "dsjob"?

1141