Transformations > Java transformation API reference > isNull
  

isNull

Checks the value of an input column for a null value. Use isNull to check if data of an input column is NULL before using the column as a value.
Use isNull in the On Input Row section of the Java editor.
Use the following syntax:
Boolean isNull(String satrColName);
Argument
Data Type
Input/Output
Description
strColName
String
Input
Name of an input column.
Use the following Java code to check the value of the SALARY input column before adding it to the output field TOTAL_SALARIES:
// If value of SALARY is not null
if (!isNull("SALARY")) {

     // Add to TOTAL_SALARIES.
     TOTAL_SALARIES += SALARY;
}
or
// If value of SALARY is not null
String strColName = "SALARY";
if (!isNull(strColName)) {

     // Add to TOTAL_SALARIES.
     TOTAL_SALARIES += SALARY;
}