Using PowerCenter to Process Flat Files in Real Time

Using PowerCenter to Process Flat Files in Real Time

Step 3. Add a Java Transformation to the Mapping

Step 3. Add a Java Transformation to the Mapping

Because the source message queue contains the file path and delimiter, add a Java transformation to the mapping that receives the file path and delimiter as input and then reads the file.
You can develop your own Java transformation, or you can use the example Java transformation described in this article. This example Java transformation takes the file path and delimiter of the flat file as input and then locates and reads the flat file. Each output port in the transformation represents one field in the file. This example uses third-party Java packages available from Super CSV.
This example Java transformation has the following limitations:
  • All of the output ports must have a String datatype. Use an Expression transformation after the Java transformation for any datatype conversion.
  • You must correctly set the port size for any field that contains data that is not a string datatype.
  • In a real-time session, you must connect all of the output ports to the next transformation.
  • You cannot partition the flat file source to perform parallel reads of different sections of the flat file.
By default, the Java SDK uses a maximum of 64 MB of memory during a session. If the real-time session with the Java transformation fails due to a lack of memory, you might need to increase the default value. Use the Administrator tool to modify the Java SDK Maximum Memory property for the PowerCenter Integration Service process.

0 COMMENTS

We’d like to hear from you!