Skip to Content
0

Need Mapping Logic to avoid Duplicates in Sender JDBC

Feb 20, 2017 at 07:34 PM

62

avatar image

Hi Folks,

Could any one of you please help me to made the condition by Graphical mapping.

We will be getting more than 1000 Records from our DB team and most of the records having duplicate values with it, and there is no key field to identify the Duplicates.

The duplicate values may comes like below flow.

The first 10 fields were the correct records and the rest of the records were duplicates starting from PLANT to VALUE

Note: If this requirement is not possible by graphical, please suggest some UDF's.

Kindly help. it's an urgent requirement.

Thank you

Regards,

RajiReddy

mapping-error.png (215.0 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Dan Kennedy Feb 27, 2017 at 12:34 AM
0

Best way is to get your DB team to give you better data! Refine the QUERY so you don't get duplicates - depending on your DB using DISTINCT or UNIQUE, otherwise you are putting unnecessary processing in the middleware layer.

Otherwise the only way i know would be to create a UDF which you take all the field parameters and put them into a multi-dimensional array. You would need to FOR loop as you go comparing each field, then setting a flag if it was a duplicate or not (clearing the flag after each iteration) - Then adding the row to the returned result-set if it wasn't a duplicate.

My advice, sort out the query or stored procedure.

Share
10 |10000 characters needed characters left characters exceeded