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

source has 2 fields like
COMPANY LOCATION
IBM HYD
TCS BAN
IBM CHE
HCL HYD
TCS CHE
IBM BAN
HCL BAN
HCL CHE
LIKE THIS.......
AND I WILL GET THE OUTPUT LIKE THIS....

Company loc count

TCS HYD 3
BAN
CHE
IBM HYD 3
BAN
CHE
HCL HYD 3
BAN
CHE

PLZ SEND ME ANSWER FOR THIS QUESTION..........

Answer Posted / saibal kumar giri

Follow below steps-----
1.Read the data with sequential file or connector stage.
2.Use copy stage to streamline the data into two links
a.One data goes to lookup stage.
b.Second stream goes to aggregator stage.
3.In aggregator stage do a count(LOCATION) group by COMPANY.
you will be having data O/P from AGG as below
COMPANY COUNT
TCS 2
HCL 3
IBM 3
Use this output data as the reference link of lookup
stage.Where you have original source as master data.
4.Do a Inner join by lookup stage.
after lookup you will have data like
COMPANY:HCL LOCATION:HYD COUNT:3
COMPANY:HCL LOCATION:CHE COUNT:3
COMPANY:HCL LOCATION:BAN COUNT:3
COMPANY:IBM LOCATION:CHE COUNT:3
COMPANY:IBM LOCATION:BAN COUNT:3
COMPANY:IBM LOCATION:HYD COUNT:3
COMPANY:TCS LOCATION:BAN COUNT:2
COMPANY:TCS LOCATION:CHE COUNT:2
5.Then use a transformer stage along with stage variables
as below
SV1->link1.COMPANY
SV3-> if SV1=SV2 then SET NULL() else link1.COMPANY
SV2->SV1
Similarly for count also
Cheers!!!!!

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is use of SDR function?

5128


I have a few records just I want to store data in to targets cycling way how?

2303


How do you generate sequence number in datastage?

1027


1.what is repartionoing technique? 2.what deliverables transferred to client using datastage? 3.how to write loop statements using nested loop sequence?

2212


How can we perform the 2nd time extraction of client database without accepting the data which is already loaded in first time extraction?

2386


CHANGE CAPTURE

1258


What are the different kinds of views available in a datastage director?

973


What is difference between server jobs & parallel jobs?

986


What are the different types of lookups in datastage?

1006


How do you schedule or monitoring the job?

1134


how to run a sequential file stage in parallel if the stage is used on the TARGET side

1687


How can you write parallel routines in datastage PX?

976


how to implement scd2 in datastage 7.5 with lookup stage

5552


What are the types of containers?

1142


What all the types of jobs you developed?

1115