Table of Contents

Search

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

Transformations

Transformations

setOutRowType

setOutRowType

Sets the update strategy for output rows. The setOutRowType method can flag rows for insert, update, or delete.
Use setOutRowType in the On Input Row section of the Java editor. You can use setOutRowType in active transformations that are configured to set the update strategy. If you use setOutRowType in an active transformation that is not configured to set the update strategy, the session generates an error and the session fails.
Use the following syntax:
setOutRowType(String rowType);
Argument
Data Type
Input/ Output
Description
rowType
String
Input
Update strategy type. Value can be INSERT, UPDATE, or DELETE.
Use the following Java code to propagate the input type of the current row if the row type is UPDATE or INSERT and the value of the input field input1 is less than 100, or set the output type as DELETE if the value of input1 is greater than 100:
// Set the value of the output field. output1 = input1; // Get and set the row type. String rowType = getInRowType(); setOutRowType(rowType); // Set row type to DELETE if the output field value is > 100. if(input1 > 100)      setOutRowType(DELETE);

0 COMMENTS

We’d like to hear from you!