Four Stars

How to capture reject records

Am very new to Talend and am loading a salesforce object from a database table.

pretty simple job and it fails to load about 5% of the data.  I am just trying to capture the reject records to a xls or csv.  such an easy thing i imagine but cant seem to find where/how.

 

any help would be appreciated.

 

thanks!

  • Data Integration
1 ACCEPTED SOLUTION

Accepted Solutions
Eleven Stars TRF
Eleven Stars

Re: How to capture reject records

Hi,
Add a tFileOutputExcel (or other output component) after tSalesfourceOutput.
Right click on tSalesfourceOutput, then "Row > Reject" and link with tFileOutputExecl.
Retrieve the Salesforce rejected records with error message in the Excel file you indicate in the tFileOutputExecl component.

TRF
12 REPLIES
Ten Stars

Re: How to capture reject records

Welcome!

 

Sorry but not clean

 

Could You attach screenshots of Your Job, errors what You have and etc.

 

It make more easy to understand - where the problem

 

 

-----------
Five Stars

Re: How to capture reject records

Hello,

 

You haven't mentioned which Database you are using I am assuming it must be SQLSql Server so in order to capture rejected records you will have to first untick "Use Batch Size" option which is in Adv settings of the tMsSqlOutput component.

 

And since you said your source is Salesforce and you are getting rejected records then even if you are able to capture the rejected records you won't be directly able to load it into your target table(if in case that's what you are trying to achieve). Instead, you can add  SET ANSI warning OFF command in tMsSqlRow this way those rows won't be included in your target and you won't get any truncation issue if those rows are not important for your project. Because mostly truncation issue comes for "Description" field of Salesforce objects. Later on, you can ON the ANSI warning at the endDesign1 to handle rejects rowsDesign1 to handle rejects rowsDesign 2 to avoid truncation issuesDesign 2 to avoid truncation issuessettings1 for Design1settings1 for Design1settings 2 for Design1settings 2 for Design1to ignore truncated rowsto ignore truncated rows

Four Stars

Re: How to capture reject records

more clarification.  my source is sql server, destination is salesforce.  

 

Thanks!

 

ss2sf.jpg

Four Stars

Re: How to capture reject records

source is sql server, destination is salesforce. i posted a pic as well
Eleven Stars TRF
Eleven Stars

Re: How to capture reject records

Hi,
Add a tFileOutputExcel (or other output component) after tSalesfourceOutput.
Right click on tSalesfourceOutput, then "Row > Reject" and link with tFileOutputExecl.
Retrieve the Salesforce rejected records with error message in the Excel file you indicate in the tFileOutputExecl component.

TRF
Four Stars

Re: How to capture reject records

thanks! figured it had to be pretty easy. much appreciated.
Six Stars

Re: How to capture reject records

I am doing exactly the same thing.. But although it is rejecting the records but in output it is still showing 0 records. Why so? can you please help?

error_talend.png

Ten Stars

Re: How to capture reject records

Your screenshot shows 7 rows coming in and 7 rows going to your database with no rejects. Are you sure there are rejects to capture?
Six Stars

Re: How to capture reject records

Yes absolutely!

The situation is that I have 10 records, out of which 7 are OK and 3 i am expecting to go as rejected records and they should be stored in a separate excel as I am trying. On the console it shows me those 3 error records like 'Invalid date' etc. but why these erroneous records do not go in the excel?

Seven Stars

Re: How to capture reject records

Hi @ppp_rrr

 

please look at the screenshot I have attached below, I guess you exactly want the same job flow.

Capture.PNG

 

In the source, I'm having 5 records in which 2 records doesn't meet my condition so it gets rejected.

 

 

Six Stars

Re: How to capture reject records

Hi @Sara,
thanks for the reply.

But when I'm trying it, it's not giving me the desired results. I am not applying any validation to the input data in tMap. Anything which is not accepted in Oracle database according to column type is rejected and should be stored in a separate excel file as a kind of report.
Please see my screeshot. you can see in console 3 rejected records, these should have gone to excel, but not so...filter_records.jpg

Seven Stars

Re: How to capture reject records

Hi @ppp_rrr

 

Please do the following  changes in your job and run

1.Uncheck "Die on error"

2.you will errorReject on your right-side just connect that to your tfileoutputexcel to see the rejected records and error message.

rejects_map.PNG