User Defined Java Expression
Description
This step allows you to enter User Defined Java Expressions as a basis for the calculation of new values.
If you have a Java expression like :
C=A+B
Then you can simply enter the right side of the expression in the dialog:
A+B
The values are exposed to the expressions as the Java objects they are :
Data type |
Java Class |
---|---|
String |
java.lang.String |
Integer |
java.lang.Long |
Number |
java.lang.Double |
Date |
java.util.Date |
BigNumber |
BigDecimal |
Binary |
byte[] |
Options
Options |
Description |
---|---|
New Field |
The new field in the data stream. If you want to overwrite an existing field, you need to define the field here and in the "Replace value" option. |
Java Expression |
The Java Expression, see examples below |
Value Type |
Type |
Length |
Length |
Precision |
Precision |
Replace value |
Select this identical to the "New field" name when you want to replace the |
Metadata Injection Support
All fields of this step support metadata injection. You can use this step with ETL Metadata Injection to pass metadata to your transformation at runtime.
Examples
Add 2 integers, A and B
A+B