Transformations > Java transformation API reference > setNull
  

setNull

Sets the value of an output column in an active or passive Java transformation to NULL. Once you set an output column to NULL, you cannot modify the value until you generate an output row.
Use setNull in any section of the Java editor except Import Packages.
Use the following syntax:
setNull(String strColName);
Argument
Data Type
Input/Output
Description
strColName
String
Input
Name of an output column.
Use the following Java code to check the value of an input column and set the corresponding value of an output column to null:
// Check the value of Q3RESULTS input column.
if(isNull("Q3RESULTS")) {

     // Set the value of output column to null.
     setNull("RESULTS");
}
or
// Check the value of Q3RESULTS input column.
String strColName = "Q3RESULTS";
if(isNull(strColName)) {

     // Set the value of output column to null.
     setNull(strColName);
}