Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

duplicate rejection does not work (as usual)

Hello,

 

the content of a csv need to be imported in a table, avoiding duplicates on a field

 

- I try to reject duplicates using tMap, but it does not filter anything

- now I use not tUniqRow, but I really dont understand why the tMap rejections was not working ???

(even if I set the "reload at each row" and even with a tDBCommit)

 

please help me, this should definetely work

 

thanks

my setup :

 

0683p000009MI7h.png

 

rejection setup :

 

0683p000009MI7m.png

 

here is the run and imported file :

 

0683p000009MHzj.png

 

 

Labels (2)
1 Solution

Accepted Solutions
TRF
Champion II
Champion II

tMap rejections was not working just because you don't ask it to remove duplicates.

What you do is just an inner join berween your main flow (row2) and a lookup (affiliate_lookup) saying "get records from main flow as soon as there no record in the lokkup with same value for the AffiliateCommercialName).

If you want to remove duplicates using tMap you can do this:

0683p000009M6gi.png

The difference is the tMap local variable named as the current AffiliateCommercialName value and populated with the number of occurence for this value. Then on the output flow you have a filter expression to remove every records but the 1rst one.

View solution in original post

6 Replies
TRF
Champion II
Champion II

tMap rejections was not working just because you don't ask it to remove duplicates.

What you do is just an inner join berween your main flow (row2) and a lookup (affiliate_lookup) saying "get records from main flow as soon as there no record in the lokkup with same value for the AffiliateCommercialName).

If you want to remove duplicates using tMap you can do this:

0683p000009M6gi.png

The difference is the tMap local variable named as the current AffiliateCommercialName value and populated with the number of occurence for this value. Then on the output flow you have a filter expression to remove every records but the 1rst one.

TRF
Champion II
Champion II

Did this help?
If so thanks to mark your case as solved.
Anonymous
Not applicable
Author

strange, all the examples I found (which were working so far)

did not need an inner variable nor an expression filter

 

https://community.talend.com/t5/Design-and-Development/resolved-Remove-all-duplicate-rows-from-flow-...

TRF
Champion II
Champion II

This example use a tFilter after the tMap which a similar solution of mine.
Once again, your tMap just tell "get records from main flow as soon as there is no record in the lookup with same value for the AffiliateCommercialName)".

There is nothing about duplicates. You have to decide and manage this case by yourself. The solution I proposed is lighter than the one you give as an example (less components used).

 

As it works and answer your question, thanks to mark your case as solved (Kudos also appreciated).

Anonymous
Not applicable
Author

I'll give it a try

Anonymous
Not applicable
Author

it works !!

which means I have to modify all my previous talend jobs, lol

I really dont understand that inner join reject, I means it's so confusing, since it looks like it's rejecting lookup matches

 

well thanks dude