Table of Contents

Search

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

Transformations

Transformations

Transaction commit control

Transaction commit control

The transaction commit control lets you control commit and roll back transactions based on a set of rows that pass through the transformation.
Enter an IIF function to specify the conditions to determine whether the
mapping
task commits, rolls back, or makes no transaction changes to the row. When the
mapping
task issues a commit or roll back based on the return value of the expression, it begins a new transaction.
You cannot configure a transaction commit control if you are connecting to multiple source objects.
Use the following syntax for the expression:
IIF (condition, value1, value2)
Use the following built-in variables when you create a transaction control expression:
  • TC_CONTINUE_TRANSACTION. The
    mapping
    task does not perform any transaction change for this row. This is the default value of the expression.
  • TC_COMMIT_BEFORE. The
    mapping
    task commits the transaction, begins a new transaction, and writes the current row to the target. The current row is in the new transaction.
  • TC_COMMIT_AFTER. The
    mapping
    task writes the current row to the target, commits the transaction, and begins a new transaction. The current row is in the committed transaction.
  • TC_ROLLBACK_BEFORE. The
    mapping
    task rolls back the current transaction, begins a new transaction, and writes the current row to the target. The current row is in the new transaction.
  • TC_ROLLBACK_AFTER. The
    mapping
    task writes the current row to the target, rolls back the transaction, and begins a new transaction. The current row is in the rolled back transaction.
If the transaction control expression evaluates to a value other than commit, roll back, or continue, the mapping is invalid.

Example

You want to use transaction commit control to write order information based on the order entry date. You want all orders entered on a given date to be committed to the target in the same transaction.
You create a field named New_Date and populate it by comparing the order date of the current row to the order date of the previous row. If the orders have different dates, then New_Date evaluates to 1.
You then use the following expression to commit data when the
mapping
task encounters a new order date:
IIF(New_Date = 1, TC_COMMIT_BEFORE, TC_CONTINUE_TRANSACTION)