We have moved to www.dataGenX.net, Keep Learning with us.

Tuesday, April 15, 2014

DataStage Scenario - Design4 - job1


DataStage Scenario Problem -->  DataStage Scenario - Problem4

Solution Design :

a) Job Design :

Below is the design which can achieve the output as we needed. Here, we are reading seq file as a input, then data is passing through a Sort and Transformer stage to achieve the output.






b) Sort Stage Properties
In Sort stage, we will sort the data based on column “Company” in ascending order.


c) Transformer Stage Properties
Here, we took 2 stage variable : StageVar, StageVar1, StageVar2
and their derivations are -
StageVar  = If StageVar1=DSLink5.Company Then DSLink5.Location:',':StageVar Else DSLink5.Location
StageVar2 = If StageVar1=DSLink5.Company Then StageVar2+1 Else 1
StageVar1 = DSLink5.Company  



d) Remove Duplicate Stage Properties
In Remove Duplicate Stage, we will retain the "LAST" record.



e) OutPut File 
In Output file, we will get the output as we desired.

HSBC,PUNE,1
IBM,BANGLOORE ,PUNE ,HYDRABAD ,CHENNAI ,4
TCS,BANGLOORE,MUMBAI,CHENNAI,3
WIPRO,HYDRABAD ,CHENNAI,2


For More ---> VISIT THIS LINK



No comments :

Post a Comment