JAVA transformation
Purpose
Java transformation in Informatica PowerCenter uses Java programming language to transform the data.
It is not necessary to write the entire Java code or use an external Java development environment as the Java code can be entered as snippets in the PowerCenter Designer client.
The code in Java transformation can invoke Informatica's custom expressions, user-defined functions, unconnected transformations and mapping variables. Java methods, variables, third-party API's, built-in Java packages and static code can be invoked as well.
Java transformation can be re-usable and it can be defined as both active or passive Informatica object.
The Java Transformation has four self-explanatory tabs: Transformation (general options), Ports (inputs and outputs in separate groups), Properties (active/passive, deterministic), and Java Code.
Once the ports and properties are set, the java code can be entered and compiled from within the designer window. The code window is divided into tab windows which includes:
- Import Packages - import 3rd party java packages, built-in or custom Java packages
- Helper code - declare user-defined variables and methods for the Java transformation class.
- On Input Row - the Java code is executed one time for each input row. Only on this tab the input row can be accessed.
- On End of Data - defines the behavior after processing all the input data
- On Receiving transaction - code which is executed when a transaction is received by the transformation
- Java expressions - used for defining and calling Java expressions
Then the code snippets get compiled into byte code behind the scenes and Integration Service starts a JVM that executes it to process the data.
Examples / useful tips
Sample Java transformation window: