JAVA TRANSFORMATION
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.
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:
The following figure shows how the Java transformation reads rows of data and passes data to a target:
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.
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
overview
The Java transformation provides a simple native programming interface to define transformation functionality with the
Java programming language. You can use the Java transformation to quickly define simple or moderately complex
transformation functionality without advanced knowledge of the Java programming language or an external Java
development environment.
Create Java transformations by writing Java code snippets that define transformation logic. You can use Java code in
a Java Transformation to parse and extract specific columns of data from a flat file. When the rows in each version of
source flat file are of varying length, use the Java Transformation to read the flat file as a string. If you use the Java
transformation to read the flat file as a string, you do not need to update the mapping for each flat file source of varying
row length.
Example
In the following example, you use Java code to extract specific columns of data from a flat file of varying schema or a
JMS message.
You want to read the first two columns of data from a delimited flat file. Create a mapping that reads data from a
delimited flat file and passes data to one or more output ports.
The following figure shows how the Java transformation reads rows of data and passes data to a target:
0 comments: