Professional Documents
Culture Documents
Java Transformation PDF
Java Transformation PDF
Content
The following example uses the Java Transformation in PowerCenter 8.x to transpose input string values as follows:
Source
Column1
Column2
Columns3
11
12
13
21
22
23
31
32
33
Target
Column1
Column2
Column3
11
21
31
12
22
32
13
23
33
The Active Java transformation can be used to achieve this in the following way:
1.
2.
3.
4.
Open Designer.
Create a mapping with a Source and Target definition.
Create a Java transformation: Click Transformation > Create >Java .
Select Active .
Helper Code:
9. Under the On Input Row tab, when an input row enters into this transformation, we can describe what action the transformation should perform.
In this example, we buffer the input row values. Whenever the input row comes, it stores all the values in the buffer sequentially.
On Input Row
10. Under the On End of Data tab, we can describe what the transformation should do when all the input data has been read.
In this example we generate output rows from this tab and buffer the entire input and generate output based on the requirement.
On End of Data
Mapping:
The simple mapping using this example Java transformation will look as follows:
Applies To
Product(s):
PowerCenter