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

What are the some differences between 7.x and 8.x version of datastage?

1253


WAT TYPE OF PL/SQL QUERRYS USED IN DATASTAGE

3646


What is the purpose of interprocessor stage in server jobs?

2231


What are some prerequisites for datastage?

1096


explain about completely flow of sequencers technicaly,without using example??explain about lookup,nullhandling?

2489


if we using two sources having same meta data and how to check the data in two sources is same or not? and if the data is not same i want to abort the job ?how we can do this?

2228


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

1165


What are stage variables and constants?

1146


1)what is the size of Fact table and dimension table? 2)how to find the size of Fact table and dimension table? 3)how to implement the surrogate key in transform stage? 4)write the configuration file path? 5)how many types of datasets explain? 6)diff b/w developed projects and migration projects? 7)how to delete the header and footer file of the sequencer file? 8)how can u call the parameters in DS in unix environment? 9) how much data ur getting daily ? 10)

2727


How many types of stage?

1176


What is the differentiate between data file and descriptor file?

1360


To see hidden files in LINIX?

1520


What is orabulk stage?

1045


Explain the datastage parallel extender (px) or enterprise edition (ee)?

1223


What are the various kinds of the hash file?

1145