Table of Contents

Search

  1. Preface
  2. Working with Transformations
  3. Aggregator Transformation
  4. Custom Transformation
  5. Custom Transformation Functions
  6. Data Masking Transformation
  7. Data Masking Examples
  8. Expression Transformation
  9. External Procedure Transformation
  10. Filter Transformation
  11. HTTP Transformation
  12. Identity Resolution Transformation
  13. Java Transformation
  14. Java Transformation API Reference
  15. Java Expressions
  16. Java Transformation Example
  17. Joiner Transformation
  18. Lookup Transformation
  19. Lookup Caches
  20. Dynamic Lookup Cache
  21. Normalizer Transformation
  22. Rank Transformation
  23. Router Transformation
  24. Sequence Generator Transformation
  25. Sorter Transformation
  26. Source Qualifier Transformation
  27. SQL Transformation
  28. Using the SQL Transformation in a Mapping
  29. Stored Procedure Transformation
  30. Transaction Control Transformation
  31. Union Transformation
  32. Unstructured Data Transformation
  33. Update Strategy Transformation
  34. XML Transformations

Transformation Guide

Transformation Guide

Java Transformation API Methods Overview

Java Transformation API Methods Overview

On the
Java Code
tab of a Java transformation
, you can add API methods to the Java code to define transformation behavior.
To add an API method to the code, expand the
Callable APIs
list in the navigator on the code entry tab, and then double-click the name of the method that you want to add to the code.
Alternatively, you can drag the method from the navigator into the Java code snippet or manually enter the API method in the Java code snippet.
You can add the following API methods to the Java code in a Java transformation:
commit
Generates a transaction.
failSession
Throws an exception with an error message and fails the
session
.
generateRow
Generates an output row for active Java transformations.
getInRowType
Returns the input type of the current row in the transformation.
incrementErrorCount
Increments the error count for the
session
.
isNull
Checks for a null value in an input column.
logError
Writes an error message to the
session
log.
logInfo
Writes an informational message to the
session
log.
rollback
Generates a rollback transaction.
setNull
Sets the value of an output column in an active or passive Java transformation to null.
setOutRowType
Sets the update strategy for output rows. Can flag rows for insert, update, or delete.

0 COMMENTS

We’d like to hear from you!