Hi Ashi,
Please find the below flow to find out your logic
testing_unique.txt :- It is our source file.
A B C D
01 P M AA
01 P M AB
02 P M AA
02 P M AC
QR_CNT:- Here we insert an flag(ABorNot) which will be '1' if the row value of D column is 'AB' other wise it will be '0'
QR_SUM:- Here we will find out the count of the flag value grouped on column A,B,C
QR_AB :- Pass the value to this transform only if the value of the Sum is zero ie.the group does'nt have entry for 'AB'.
and hardcode the value of the D as 'AB' in output.
OUTER JOIN :- Join the testing_unique_1( Outer source) with QR_AB(Inner Source).
Where :-
test_unique_1.A = QR_AB.A AND
QR_AB.B = test_unique_1.B AND
QR_AB.C = test_unique_1.C
The logic for the columns are.
A:- Directly mapped from test_unique_1
B:- Directly mapped from test_unique_1
C:- Directly mapped from test_unique_1
D:- ifthenelse(QR_AB.A = test_unique_1.A AND
QR_AB.B = test_unique_1.B AND
QR_AB.C = test_unique_1.C AND
test_unique_1.D = 'AA', QR_AB.D, test_unique_1.D)
I Hope this will help You. Please Reply with your thoughts
Regards
Asgar