Data types equivalence

The code you type inside the UDJC step is pure Java. Therefore, the fields of your Transformation will be seen as Java objects according to the following equivalence table:

Data type in PDI

Java Class

String

Java.lang.String

Integer

Java.lang.Long

Number

Java.lang.Double

Date

Java.util.Date

BigNumber

BigDecimal

Binary

byte[]

The opposite occurs when you create an object inside the Java code and want to expose it as a new field of your Transformation. For example, in the Java code, if you define a long variable in the Fields tab, you have to define the correspondent output field as Integer.

Get Learning Pentaho Data Integration 8 CE - Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.