Talend Connect
Virtual Summit
JOIN US!
And visit the Customer
& Community Lounge.
May 27-28, wherever you are.

Catching errors and tAssert

Highlighted
Six Stars

Catching errors and tAssert

I have a job populating data in a SalesforceOutput component.  I would like to catch any errors on the rows that didn't make it in.   My plan was to use tAssert and tie it to the SalesforceOutput component and send the failures there.  Then, use tAssertion catcher to write to a output file. Is this the right approach?   If so, I am not sure what I need to populate in the expression for the tAssert.  Any help would be appreciated.  


Accepted Solutions
Highlighted
Employee

Re: Catching errors and tAssert

@steeld95 

 

If you are using file to store the logging information, you can use Append mode (check box under basic section of file output components) to load the data and it will prevent overwriting. But I would always suggests to use Databases instead of files to track these type of information. Files can get manipulated or corrupted easily but DB is not error prone like files. So if you want to create any audit information, create some audit tables and load the data there.

 

Coming to tAssert, it is used to assert or confirm that flow has passed through that route of the overall job execution. The best way to catch errors is also by redirecting the error flows (like OnSubJobError) to a database so that you know the place of error.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

View solution in original post


All Replies
Highlighted
Moderator

Re: Catching errors and tAssert

@steeld95 ,you can directly take the main>>reject form tSaleasforceOutput to tfiloutputdelimiter and if any record was failed to insert/update it will route that file.

Manohar B
Don't forget to give kudos/accept the solution when a replay is helpful.
Highlighted
Six Stars

Re: Catching errors and tAssert

Thanks for the suggestion @manodwhb .   I can set that up.  My only question is, each time that job is run, will the file from the previous job get overwritten?   Is there a way to store a record each time the job runs?  Also, just for clarification, is the tAssert and tAssertcatcher not intended to log row errors for outputs?  Seems like maybe they have a different intended purpose. 

Highlighted
Employee

Re: Catching errors and tAssert

@steeld95 

 

If you are using file to store the logging information, you can use Append mode (check box under basic section of file output components) to load the data and it will prevent overwriting. But I would always suggests to use Databases instead of files to track these type of information. Files can get manipulated or corrupted easily but DB is not error prone like files. So if you want to create any audit information, create some audit tables and load the data there.

 

Coming to tAssert, it is used to assert or confirm that flow has passed through that route of the overall job execution. The best way to catch errors is also by redirecting the error flows (like OnSubJobError) to a database so that you know the place of error.

 

Warm Regards,
Nikhil Thampi

Please appreciate our Talend community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved :-)

View solution in original post

2019 GARTNER MAGIC QUADRANT FOR DATA INTEGRATION TOOL

Talend named a Leader.

Get your copy

OPEN STUDIO FOR DATA INTEGRATION

Kickstart your first data integration and ETL projects.

Download now

Best Practices for Using Context Variables with Talend – Part 2

Part 2 of a series on Context Variables

Blog

Best Practices for Using Context Variables with Talend – Part 1

Learn how to do cool things with Context Variables

Blog

Migrate Data from one Database to another with one Job using the Dynamic Schema

Find out how to migrate from one database to another using the Dynamic schema

Blog