Six Stars

How to capture error message due to which record got rejected in tmap

Hi,

 

In one of the job, I want to capture the reject reason, why record got rejected in tMap. I am getting the rejected record, but want to capture the reason(error msg) why record got rejected. Is there any way to capture the reason in tMap?

 

 

8 REPLIES
Ten Stars

Re: How to capture error message due to which record got rejected in tmap

Talend community celebrity @rhall_2_0 wrote a guide for this:

https://www.rilhia.com/quicktips/quick-tip-how-debug-tmap-errors

Six Stars

Re: How to capture error message due to which record got rejected in tmap

Hi, Thanks for your reply. 

 

But that what I am not looking for.

 

My question is,

Suppose, for example, you have two files and you joined in tMap, now suppose, there are some records which are not joined, those records we can capture by setting "Catch lookup Inner join reject" to true. Now if you have 4-5 lookup in your tMap, and you set true for "Catch lookup Inner join reject", you will get the rejected records but you will not get the reason, why those rejects happening. what is the reason joining is not happening. From which lookup, record not matched and it comes to reject port. 

Suppose, flow-1 is main flow, 2-4 are lookup flow.

when you joined, one record from flow-1 is not present in lookup-2 and it comes to reject port. Now record comes to reject port as value is not present in flow-2(lookup2) and same way for other flow.

 

so I need to capture the reason of reject., How we can do here in Talend.

 

Thanks,

 

Twelve Stars TRF
Twelve Stars

Re: How to capture error message due to which record got rejected in tmap

There is 2 cases where rows are rejected from tMap: inner join and filter.
For both, you can catch rejected records on specific output flows but you have to manage messages by yourself. Also, if you have multiple joins or filters, you cannot assign by configuration a specific output flow for a specific reject cause.

TRF
Six Stars

Re: How to capture error message due to which record got rejected in tmap

@TRF thanks for your reply. But if I want to capture the message or some custom message, how this can be achieve for more than one join. Mesage for each record which fails in inner join.

Twelve Stars TRF
Twelve Stars

Re: How to capture error message due to which record got rejected in tmap

@mailforsaggy, I understand what you're asking for, but as wrote in my previous post, as I know this is not possible. The only way I know to achive this, is to use differents tMap.
If someone else have a solution to propose, it should be a very good news.

TRF
Ten Stars

Re: How to capture error message due to which record got rejected in tmap

You'll either need to do a separate tMap for each lookup or do left joins and follow up with a 2nd tMap with multiple outputs conditional on non-null lookup values.
Six Stars

Re: How to capture error message due to which record got rejected in tmap

@TRF and @cterenzi, I too feel so. I have to consider only 2 tables per tMap and proceeding with that. Smiley Indifferent 

Moderator

Re: How to capture error message due to which record got rejected in tmap

Hello,

There is also "ErrorReject" in tMap.This row link connects a tMap component to an output component. This link is enabled when you clear the Die on error check box in the tMap editor and it gathers data that could not be processed (wrong type, undefined null value, unparseable dates, etc.).
Best regards

Sabrina

--
Don't forget to give kudos when a reply is helpful and click Accept the solution when you think you're good with it.