Designing jobs with the Java Integration stage
You can use the Java™ Integration stage to integrate Java code and develop jobs that read, write, and load data.
Reading data from Java code
To read data from your Java code with the Java Integration stage, you need to integrate a Java code supported by the Java Integration stage and configure the Java Integration stage to process data as a source. The Java Integration stage extracts or reads data from your Java code. To configure Java Integration stage as a source, see Configuring Java Integration stage as a source (DataStage).
The following figure shows an example of using the Java Integration stage to read data. In this case, the Java Integration stage Java_Stage_0 reads data and writes it to the files Peek_1 and Peek_2. When you configure the Java Integration stage to read data, you can create 1 or more output links Peek_1 and Peek_2, which is shown in the figure below transferring rows from Java_Stage_0 to Peek_1 and Peek_2.

Writing data to Java code
To write data to your Java code with the Java Integration stage, you need to integrate a Java code that is supported by the Java Integration stage and configure the Java Integration stage to process data as a target. To configure Java Integration stage as a target, see Configuring Java Integration stage as a target (DataStage).
The following figure shows an example of using the Java Integration stage to pass data to Java code. In this case, the row generator reads data from the files Row_Generator_5 and Row_Generator_7 and then the Java Integration stage Java_Stage_0 inserts, updates, or deletes data as required.

Transforming data
To transform data with the Java Integration stage, you need to integrate a Java code that is supported by the Java Integration stage and configure the Java Integration stage to transform data on input link, and write results to output link. To configure the Java Integration stage as a transformer, see Configuring Java Integration stage as a transformer (DataStage).
The following figure shows an example of using the Java Integration stage as a transformer. In this case, the row generator reads data from Row_Generator_5 and then the Java Integration stage Java_Stage_0 writes the transformed data to Peek_1 and to the reject link Peek_2.
