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

Hi ALL,

Job Design:

SourceSeqFile--->SortStage--->Transformer--->TgtSeqFile

1. In Sort Stage, take two key, name & company and then go
to options and create a keyChange column.
2. In transformer stage, create a stage variable of integer
type (say Var1) and write in it's derivation:
if keyChange=1 then 1 else Var1+1
3. Now create a new column in tgt (say count) and in
transformer, assign that Var1 to the derivation of count.
4. Goto o/p tab of transformer and there sort the data on
count column.
You'll get the desired output.

If you have more queries, you can mail me on
ankitgosain@gmail.com

Cheers,
Ankit :)

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the stages in datastage?

1086


Name the different sorting methods in datastage.

1059


Name the command line functions to import and export the DS jobs?

1159


What is the difference between hashfile and sequential file?

1266


What are the important features of datastage?

1129


What is the roundrobin collector?

1101


What are the partitioning techniques available in link partitioner?

2281


What are datastage sequences?

1126


What are the various kinds of containers available in datastage?

1048


What is the flow of loading data into fact & dimensional tables?

1068


What are the repository tables in datastage?

1310


What are the different plug-ins stages used in your projects?

1078


What is a quality stage in datastage tool?

1082


What is ds designer?

1109


How to convert RGB Value to Hexadecimal values in datastage?

4001