Using tAssert and tAssertCatcher for error handling - Cloud - 8.0

Talend Studio User Guide

Version
Cloud
8.0
Language
English
Product
Talend Big Data
Talend Big Data Platform
Talend Cloud
Talend Data Fabric
Talend Data Integration
Talend Data Management Platform
Talend Data Services Platform
Talend ESB
Talend MDM Platform
Talend Real-Time Big Data Platform
Module
Talend Studio
Content
Design and Development
Last publication date
2024-02-29
This section explains how to design error handling with tAssert and tAssertCatcher.

tAssert works alongside tAssertCatcher to evaluate the status of a Job execution. It generates a boolean evaluation, either OK or FAIL, for the Job execution status.

These two components, when used together, help catching certain types of errors and handling or routing them to the right direction, as per the project requirement.

Use case

A Job expects a file with ten lines of data. Each line has a master record data about its data center. The batch processing should start only if this files arrives with ten lines of data.

Sample Job

Sample Job in the design workspace.

Design

In this Job, tFileRowCount reads the record count.

In tAssert, there is a condition to validate if the record count is equal to ten. tAssert performs the condition check and declares either OK or FAIL as output.

tAssertCatcher catches the output given by tAssert and, in this example, displays the output to the console.

This Job can be used for numerous tasks, such as:
  • Triggering the next set of Jobs in an execution plan
  • Sending an email to the source team stating that the input records are either good or not good, depending on the result