Tuesday, 14 August 2012

scenario 4



Input is like this:
file1
10
20
10
10
20
30
Output is like:
file2               file3(duplicates)
10                  10 
20                  10
30                  20

2 comments:

  1. Ans)

    FIle----->Tfm---->Filter-------------->2 Target Files

    Step:1) Go to Transformer and take two stage variables like sv and sv1

    sv1=sourceName
    sv= if sourceName=sv1 then sv+1 else 1

    write this in stage variables and do the hash partition in transformer
    and take extra column(like Num1) in transformer stage and mapping the sv (stage variable) in that particular column

    Step2)

    and then go to filter stage write two condition

    condition1: Where: Num1=1
    Output:0
    condition2: Where: Num1<>1
    Output:1

    ReplyDelete
  2. can be done more easily..

    Just remove the filter and put condition in the constraints of transformer.

    ReplyDelete