Skip to main content
Announcements
Global Transformation Awards! Applications are now open. Submit Entry
cancel
Showing results for 
Search instead for 
Did you mean: 
Serphentelm
Contributor III
Contributor III

How to create a reject flow from tmap

Hi, newbie here.

I was doing a job that joins 3 postgres tables and produce an output as follows:

0695b00000hua1sAAA.png 

quite a simple job.

The join is as follows:

 

select tverdet.*, ana.pkid as pkid_anag

from tmp_ici_ver_spontanei_det tverdet

join an1_trasco tan1 on tverdet.codice_trasco_an1 = tan1.codice

join an1_anagrafe_unica ana on tan1.id_anag_unica = ana.pkid

 

And here's my problem: there are some records in my

tmp_ici_ver_spontanei_det that haven't a match in the an1_trasco, so if I have 10 rows in input from the join, I will have, let's say, 8 rows in the output.

 

Is there a way to filter this information generating so 2 output files?

 

Sql like is quite simple: I will add a statement like "and not exists(select * from an1_trasco tan1 where tan1.codice = tverdet.codice_trasco_an1). But this will imply modifying the current job and passing a sql query directly in the input, and so having 2 input; one that consider the join and one that take the excluded rows.

 

Sorry for the bad english

Labels (2)
1 Solution

Accepted Solutions
Anonymous
Not applicable

Hi

See below, do an inner join on tMap, set the 'Catch lookup inner join reject' option as true to output the rejected rows in another output table.

0695b00000hua4IAAQ.jpg 

Let me know if this is what you expected?

 

Regards

Shong

View solution in original post

2 Replies
Anonymous
Not applicable

Hi

See below, do an inner join on tMap, set the 'Catch lookup inner join reject' option as true to output the rejected rows in another output table.

0695b00000hua4IAAQ.jpg 

Let me know if this is what you expected?

 

Regards

Shong

Serphentelm
Contributor III
Contributor III
Author

Thanks Shong, that's exactly what I was looking for.

Talend has so many component to discover that's quite overwelming!

Thnaks again