Table of Contents

Search

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

Transformations

Transformations

Creating Java code snippets

Creating Java code snippets

To create Java code snippets that define transformation behavior, use the Java editor on the
Java
tab.
The following image shows the
Java
tab with the Java editor expanded:
The Java tab of the Java transformation contains the Java editor. In this image the Helper Code section is selected. The APIs tab lists the API methods that you can use in the Helper Code section.
  1. Inputs, Outputs, and APIs tabs. Use these tabs to add input and output fields as variables and to call API methods in the Java code snippets. The fields and methods displayed on these tabs vary based on which section of the code entry area is selected.
  2. Go to list. Use to switch among the sections in the code entry area.
  3. Minimize, Open Both, and Maximize icons. Use the Minimize and Maximize buttons to minimize and maximize the transformation properties. Use the Open Both icon to open the Mapping Designer canvas and the transformation properties at the same time.
  4. Code entry area. Enter Java code snippets in the Import Packages, Helper Code, On Input Row, At End of Data, and On Receiving Transaction sections.
  5. Compilation results. Expand the compilation results to see detailed compilation results, compilation errors, and view the full code.
To expand the transformation properties so that you can see the code entry area more fully, click
Maximize
.
  1. In the
    Go to
    list, select the section in which you want to enter a code snippet.
  2. To access an input or output field in the snippet, select the field on the
    Inputs
    or
    Outputs
    tab, and click
    Add
    .
    You can also create output fields on the
    Outputs
    tab by clicking
    Create New Field
    .
  3. To call a Java transformation API method in the snippet, select the method on the
    APIs
    tab, and click
    Add
    .
    The methods displayed on the
    APIs
    tab change based on which section is selected. For example, you can use the getInRowType method only in the On Input Row section but not in other sections. Therefore, this method is listed only when the On Input Row section is selected.
  4. If necessary, configure the method input values.
  5. Write appropriate Java code based on the section.
After you finish creating the Java code snippets, compile the code to validate the transformation.

0 COMMENTS

We’d like to hear from you!