This scenario applies only to Talend Data Management Platform, Talend Big Data Platform, Talend Real Time Big Data Platform, Talend Data Services Platform, Talend MDM Platform and Talend Data Fabric.
For more technologies supported by Talend, see Talendコンポーネント.
This following scenario creates a six-component Job that shows how to handle error conditions using the tHMap component.
When tHMap executes a Talend Data Mapper map, an ExecutionStatus
object is
always returned. A pointer to this object is stored in the globalMap as <tHMap_id>_EXECUTION_STATUS
. In addition, the Overall Severity
numeric value is also stored in the globalMap
as <tHMap_id>_EXECUTION_SEVERITY
.
Finally, a parameter called Exception Threshold is defined that specifies the severity on which to throw an exception, thus triggering Job-related or component-related error processing. This value can be defined in the tHMap properties, in the Advanced settings tab. The default value for this parameter is Fatal.
org.talend.transform.runtime.common.MapExecutionStatus
to get
information about your map execution:-
getOverallSeverity()
: returns the numeric value of the highest severity level.-
INFO
is returned as1
-
WARN
is returned as2
-
ERROR
is returned as4
-
FATAL
is returned as0x40
-
-
isOK()
: returns true if there is no warning, error or fatal status. -
exportToXml(writer)
: writes the status items in XML format.