Informatica PowerCenter extended its functionality to support the Java language from the version of 8.0. Informatica PowerCenter provides a simple programming interface to implement transformation functionality with java programming language. Informatica PowerCenter facilitates the developers/users to import the java packages and use them to achieve specific business rule which defined in the java package. Looping of data is now easily possible with help of Java transformation.

The main advantage of this transformation is multiple rows can be generated for a single input row based on the condition. The Normalizer can generate Static rows based on the ‘Occurs’ clause where we will specify a static number. If we want to generate multiple rows based on a dynamic value then we would depend on java transformation.

Informatica power center client uses JDK to compile java code and generates byte code. PowerCenter client stores the byte code in the PowerCenter repository. The Integration service uses JRE to execute the generated byte code at run time.

Java transformation has common input/output ports like other transformations.

Let’s have a simple example to implement java transformation.

Source: PATIENT_PRE_DTL

Target: PATIENT_PRE_TBLS

The source table contains the patient ID, Name and tablets (Separated by #) which doctor have prescribed for a patient. The data from source should be populated into the target as mentioned in the above example. A single row from source table has to be converted into multiple rows based on number of tablets, and load into the target table. This is a typical scenario where we cannot use Normalizer Transformation since we have no information about the occurrence (Number of tablets prescribed by doctor may be varying for patient to patient). We can achieve this functionality in a simple way by
using Java transformation.

generateRow() – This is a build-in function which is used to generate output row. As per our code Java transformation takes a single record as an input and creates multiple records based on the number of tablets.