Table of Contents

Search

  1. Preface
  2. Transformations
  3. Source transformation
  4. Target transformation
  5. Access Policy transformation
  6. B2B transformation
  7. Aggregator transformation
  8. Cleanse transformation
  9. Data Masking transformation
  10. Data Services transformation
  11. Deduplicate transformation
  12. Expression transformation
  13. Filter transformation
  14. Hierarchy Builder transformation
  15. Hierarchy Parser transformation
  16. Hierarchy Processor transformation
  17. Input transformation
  18. Java transformation
  19. Java transformation API reference
  20. Joiner transformation
  21. Labeler transformation
  22. Lookup transformation
  23. Machine Learning transformation
  24. Mapplet transformation
  25. Normalizer transformation
  26. Output transformation
  27. Parse transformation
  28. Python transformation
  29. Rank transformation
  30. Router transformation
  31. Rule Specification transformation
  32. Sequence Generator transformation
  33. Sorter transformation
  34. SQL transformation
  35. Structure Parser transformation
  36. Transaction Control transformation
  37. Union transformation
  38. Velocity transformation
  39. Verifier transformation
  40. Web Services transformation

Transformations

Transformations

Data type conversion

Data type conversion

A Java transformation converts
Data Integration
transformation data types to Java data types, based on the Java transformation field type.
When a Java transformation reads input rows, it converts input field data types to Java data types. When a Java transformation writes output rows, it converts Java data types to output field data types.
For example, the following processing occurs for an input field with the integer data type in a Java transformation:
  1. The Java transformation converts the integer data type of the input field to the Java primitive int data type.
  2. In the transformation, the transformation treats the value of the input field as the Java primitive int data type.
  3. When the transformation generates the output row, it converts the Java primitive int data type to the integer data type.
The following table shows how the Java transformation maps the
Data Integration
transformation data types to Java primitive and complex data types:
Transformation data type
Java Data Type
bigint
long
binary
byte[]
date/time
BigDecimal
long (number of milliseconds since January 1, 1970 00:00:00.000 GMT)
decimal
double
BigDecimal
double
double
integer
int
string
String
text
String
In Java, the String, byte[], and BigDecimal data types are complex data types, and the double, int, and long data types are primitive data types.
The Java transformation sets null values in primitive data types to zero. You can use the isNull and the setNull API methods in the On Input Row section of the Java editor to set null values in the input field to null values in the output field. For an example, see setNull.
The decimal data type maps to BigDecimal when high precision is enabled. BigDecimal cannot be used with some operators, such as the
+
operator. If the Java code contains an expression that uses a decimal field and the field is used with one of the operators, the Java code fails to compile.

0 COMMENTS

We’d like to hear from you!
David Gutteridge - April 04, 2024

This is missing documentation about date/time type handling. The chart references that it could be exposed as either long or BigDecimal, but there is no explanation of how this would be configured (unlike the "NOTE" entry that does explain this distinction for the decimal type). I see from looking inside IICS it is associated with the "Use Nanoseconds in Date/Time" Advanced setting, and it does explain it in a hover field there. Please add that information to this page.

Informatica Documentation Team - April 04, 2024

Hi David Gutteridge,

Thanks for reaching out! We'll verify this information with our development team and update the documentation in an upcoming release.