Four Stars

Catching a DB error

Hello , I've tried to find a solution to that problem,without any success right now.

 

My flow is to load csv files into DB , and during the run of the jobs , there are some errors like "incorrect string " that made the row fail.

the problem is that I want to know exactly which one of the rows failed in order to use it later on.

 

How can I do this in Talend?

tLogCatcher didn't helped.

thanks!

5 REPLIES
One Star TKE
One Star

Re: Catching a DB error


>>> 

My flow is to load csv files into DB , and during the run of the jobs , there are some errors like "incorrect string " that made the row fail.

the problem is that I want to know exactly which one of the rows failed in order to use it later on.

>>>

 

I guess you are using some kind of output component for the DB insert/update action e.g. tMySqlOutput, tOracleOutput... depending on your Database System.

Right click that component and connect "on component Error" with a tLogRow. This should log out all errors to the console

 

Regards, Tom

 



 

Four Stars

Re: Catching a DB error

I have already tried the "on component error " thing, it didn't work
Twelve Stars TRF
Twelve Stars

Re: Catching a DB error

Connect the tFileInputDelimited to a tLogRow using the reject flow (right click on tFileInputDelimited then reject and connect to tLogRow).
Of course you can change tLogRow by any other out component you want.

TRF
Four Stars

Re: Catching a DB error

I've tried it also ... but it didn't work . it didn't catch the db error as "Reject" somehow...

 

Twelve Stars TRF
Twelve Stars

Re: Catching a DB error

Can you share your job design ?

TRF