Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9238

Re: BODS- Taking an Unique record

$
0
0

 

Hi Ashi,

 

Please find the below flow to find out your logicTest_Un.JPG

 

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'

TEST_UN1.JPG

 

QR_SUM:- Here we will find out the count of the flag value grouped on column A,B,C

Test_Un2.JPG

 

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.

Test_Un3.JPG

 

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)

Test_Un4.JPG

 

I Hope this will help You. Please Reply with your thoughts

 

Regards

Asgar

 


Viewing all articles
Browse latest Browse all 9238

Trending Articles