Input file :
Sq, No1,1000
2,2200
3,3030
4,5600
Output File :
Sq, No,No21,1000,2200
2,2200,3030
3,3030,5600
4,5600,NULL
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.
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 “Sq” in
descending order.
c)
Transformer Stage Properties
Here,
we took 2 stage variable : StageVar, StageVar1
and their derivations are -
and their derivations are -
- StageVar1
= StageVar
DSLink6.No = StageVar1
d)
Output File
Before capturing the data into Sequential file. We will sort the data again in ascending order to get the output as we needed.
Before capturing the data into Sequential file. We will sort the data again in ascending order to get the output as we needed.
3 comments:
Are you sure,this works fine ??
if not can you just show us the right way.
This logic works perfectly fine.. Thanks a lot..
Hi I have tried your logic . but the o/p is not coming . while selcting sq no .and changing to ascending .it asking for partation ?
Post a Comment