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

Monday, May 26, 2014

DataStage Scenario - Design8 - job1


DataStage Scenario Problem -->  DataStage Scenario - Problem8

Solution Design :

a) Job Design : 
Below is the design which can achieve the output as we needed. Here, we are reading 2 seq file as a input, then data is passing through a Join and Filter stage to achieve the output.



http://datastage4you.blogspot.com/2014/05/datastage-scenario-design8-job1.html

b) Join Stage Properties : For the required output, we have to join the both input file on "Col1". Here we are using FULL OUTER JOIN.


http://datastage4you.blogspot.com/2014/05/datastage-scenario-design8-job1.html 

 FULL OUTER JOIN will generate the 2 columns LEFT n RIGHT. Map the both columns to Join Output.


http://datastage4you.blogspot.com/2014/05/datastage-scenario-design8-job1.html 

b) Filer Stage Properties : Now, In Filter Stage, We will filter the data as per requirement. 
Here ....
FileA = Left and FileB = Right
So...
Data Only in FileA = where Right_Col1 = 0 or "" or NULL
Data Only in FileB = where Left_Col1 = 0 or "" or NULL
Data in both FileA and FileB = where (Right_Col1 <> 0 or "" or NULL) and (Left_Col1 <> 0 or "" or NULL)

## Note :-
Left and Right Col will be = 0 or "" or NULL if-
NULL => Data will be NULL if the Source is DB. ( But here we are using seq file )
In case of Sequence File as Source
"" => Data will be "" if the column data type is VarChar.
0 => Data will be 0 if the column data type is Integer.

 http://datastage4you.blogspot.com/2014/05/datastage-scenario-design8-job1.html

Now, we will map the columns to output. 
For "Data available only in FileA" :-  Assign Left to Output.


http://datastage4you.blogspot.com/2014/05/datastage-scenario-design8-job1.html

For "Data available only in FileB" :- Assign Right to Output.

http://datastage4you.blogspot.com/2014/05/datastage-scenario-design8-job1.html

For "Data available  in Both " :- Assign Right or Left to Output.



For More ---> VISIT THIS LINK


No comments :

Post a Comment