You can define the behavior of an active or passive Java transformation when it has processed all input data. Define end of data behavior in the At End of Data section of the Java editor.
To generate output rows in the At End of Data section, set the transformation scope for the transformation to Transaction or to All Input on the
Advanced
tab. You cannot access or set the value of input field variables in this section.
Access and use the following variables and methods in the At End of Data section:
Output field variables
Use the names of output fields as variables to access or set output data for active Java transformations.
User-defined methods
Use any user-defined method that you declared in the Helper Code section.
Java transformation API methods
Call API methods provided by the Java transformation. For example, use the following Java code to write information to the session log when the end of data is reached:
logInfo("Number of null rows for partition is: " + partCountNullRows);
If you use the Java transformation in advanced mode, consider the following guidelines:
You cannot write output to standard output, but you can write output to standard error which appears in the log files.
You cannot pass binary null characters to an output field.
To avoid a mapping failure, you can add code to the Java transformation that replaces the binary null characters with an alternative character before writing the data to the output field.