Page 1 of 1

Posted: Wed May 18, 2011 11:36 am
by jwiles
Sort your data so that the combination of F1/F2 values that trigger a drop will appear in the first record for a given value of keycolumn. In a transformer after the sort, keep track of key changes. When the key changes, examine F1 & F2 for the the drop condition and set a stage variable flag accordingly. Use a constraint to keep or drop records based on the flag.

Regards,

Posted: Wed May 18, 2011 12:40 pm
by soumya5891
You can do this in the following way also
1. First use a sort and then use a remove duplicate to retain the first row
2. Then use a filter with the following conditions f1<>"N" and f2<>"N".

Posted: Wed May 18, 2011 1:05 pm
by jwiles
No, that will not meet the requirements he has specified. He needs to completely remove only the keys which have at least one record where f1 and f2 are both equal to 'N'. All other keys will be left alone (no drops when 'N' and 'N' doesn't exist for a key).

Regards,

Posted: Thu May 19, 2011 5:13 am
by peddakkagari
1. Process your source data into two flows(mainflow and change flow) from transformer stage
2. add dummy=1 in tranformer for changed flow
3.put sort stage in changed flow by sorting on the 3 columns(key,f1 and f2)
4.put filter using the condition f1=f2=N, then the output of this stage will be having the key's with both f1 and f2=N
5. Use Left outer join between main flow and changed flow, output of this join will be 3 columns from main flow and dummy column from changedflow
6.Use transformer and add conditon as dummy<>1 and send the output to target

Re: Need to drop records

Posted: Tue May 24, 2011 2:20 am
by Tejas Pujari
Step 1:

Usea filter stage apply condition f1 = N and f2= N
you will get all key columns having both non key columns value N.

Step 2:

use look up stage with step1 out put as reference. join on the Key column
use reject link for lokkup failure.
the data in Reject file will be your desired output.