Java Transformation Advanced Properties
The Java transformation includes advanced properties for both the transformation code and the transformation.
When you use the transformation in a mapping, you can override the transformation properties.
You can define the following advanced properties for the Java transformation on the Advanced tab:
- Tracing Level
- Amount of detail that appears in the log for this transformation. You can choose terse, normal, verbose initialization, or verbose data. Default is normal.
- Partitionable
The transformation can be processed with multiple threads. Clear this option if you want the Data Integration Service to use one thread to process the transformation. The Data Integration Service can use multiple threads to process the remaining mapping pipeline stages.
Disable partitioning for a Java transformation when the Java code requires that the transformation be processed with one thread.
- Enable high precision
- Processes a decimal data type port with a precision less than or equal to 38 as a Java BigDecimal data type port.
- Disable high precision to process a decimal data type port as a Java Double data type port.
The following table shows how a Java transformation treats a value in a decimal data type input port based on whether you have enabled or disabled the high precision option:
Example | High Precision Processing Enabled | High Precision Processing Disabled |
---|
A decimal type input port receives a value of 40012030304957666903. | The Java transformation leaves the value as is. | The Java transformation converts the value to the following value: 4.00120303049577 x 10^19 |
- Use nanoseconds in Date/Time
Converts date/time datatype ports to Java BigDecimal datatype ports with nanosecond precision.
Disable nanosecond processing so that the generated Java code converts date/time datatype ports to Java Long datatype ports with millisecond precision.
- Classpath
- Sets the classpath for jar or class file directories that are associated with non-standard Java packages that you import on the Imports tab.
The jar or class file directories must be accessible on the Developer tool client machine for compilation of the Java code.
- Based on the operating system, separate classpath entries as follows:
- - On UNIX, use a colon to separate classpath entries.
- - On Windows, use a semicolon to separate classpath entries.
For example, if you import the Java converter package on the Imports tab and you define the package in converter.jar, you must add the location of the converter.jar file to the classpath before you compile the Java code for the Java transformation.
- Is Active
The transformation can generate more than one output row for each input row.
You cannot change this property after you create the Java transformation. If you need to change this property, create a new Java transformation.
- Transformation Scope
- Defines the method that the Data Integration Service uses to apply the transformation logic to incoming data. You can choose one of the following values:
- - Row. Applies the transformation logic to one row of data at a time. Choose Row when the results of the procedure depend on a single row of data.
- - Transaction. Applies the transformation logic to all rows in a transaction. Choose Transaction when the results of the procedure depend on all rows in the same transaction, but not on rows in other transactions. When you choose Transaction, you must connect all input groups to the same transaction control point.
- - All Input. Applies the transformation logic to all incoming data. when you choose All Input, the Data Integration Service drops transaction boundaries. Choose All Input when the results of the procedure depend on all rows of data in the source.
Note: The Transformation Scope property is valid only in a Hive environment.
- Stateless
Maintain the row order of the input data to the transformation. Select this option if the Data Integration Service should not perform any optimization that can change the row order.
When the Data Integration Service performs optimizations, it might lose an order established earlier in the mapping. You can establish order in a mapping with a sorted flat file source, a sorted relational source, or a Sorter transformation. When you configure a transformation to maintain row order, the Data Integration Service considers this configuration when it performs optimizations for the mapping. The Data Integration Service performs optimizations for the transformation if it can maintain the order. The Data Integration Service does not perform optimizations for the transformation if the optimization would change the row order.
Configuring the Classpath for the Developer Tool Client
You can add jar files or class file directories to the Developer tool client classpath.
To set the classpath for the machine where the Developer tool client client runs, complete one of the following tasks:
- •Configure the CLASSPATH environment variable. Set the CLASSPATH environment variable on the Developer tool client client machine. This applies to all java processes run on the machine.
- •For a non-reusable Java transformation, configure the the classpath in the Java transformation advanced properties. This applies to mappings that include this Java transformation. The Developer tool client client includes files within the classpath when it compiles the java code.
To add jar or class file directories to the classpath in a Java transformation, complete the following steps:
1. On the Advanced tab, click the down arrow icon in the Value column next to Classpath.
The Edit Classpath dialog box appears.
2. To add a classpath, complete the following steps:
- a. Click Add.
The Save As window appears.
- b. In the Save As window, navigate to the directory where the jar file is located.
- c. Click OK.
The classpath appears in the Edit Classpath dialog box.
3. To remove a jar file or class file directory, select the jar or class file directory and click Remove.
The directory disappears from the list of directories.
Configuring the Classpath for the Data Integration Service
You can add jar or class file directories that are required at run time to the classpath on the Data Integration Service node.
Place the jar files that are required during runtime in the following directory on the Data Integration Service node:
$INFA_HOME/services/shared/jars
The jar files in this location are loaded dynamically. Any class files that are required by individual mappings at run time are found and loaded from this directory.
Note: The Java transformation adds any jar files in this directory to the mapping-level classpath.