incrementErrorCount
Increases the error count for the session. If the error count reaches the error threshold for the session, the session fails.
Use incrementErrorCount in any section of the Java editor except Import Packages.
Use the following syntax:
incrementErrorCount(int nErrors);
Argument | Data Type | Input/Output | Description |
---|
nErrors | Integer | Input | Number of errors to increment the error count for the session. |
Use the following Java code to increment the error count if an input field for a transformation has a null value:
// Check whether input employee ID or name is null.
if (isNull ("EMP_ID_INP") || isNull ("EMP_NAME_INP"))
{
incrementErrorCount(1);
// If input employee ID or name is null, don't generate an output row for this input row.
generateRow = false;
}