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 Control transformation

Transaction Control transformation

The Transaction Control transformation is an active transformation that commits or rolls back sets of rows during a mapping run. Use the Transaction Control transformation to commit or roll back transactions from transactional targets such as relational, XML, Amazon Redshift, and REST V2 targets. You can also use the transformation in a mapping to write data to a different flat file each time that
Data Integration
starts a new transaction.
You might want to use a Transaction Control transformation when you process large amounts of data. You can use the Transaction Control transformation to commit the data at certain intervals to prevent data loss. For example, you run a mapping that processes thousands of records in a table that is sorted by order type. You might want to commit the data each time that the mapping processes a different order type.
In a Transaction Control transformation, a transaction is the row or set of rows bound by commit or roll back rows. A transaction can be based on a group of rows that are ordered on a common key, such as employee ID or order entry date. The number of rows in each transaction can vary.
You define a transaction by specifying the transaction control condition in the transformation. Based on whether the condition is met, you can choose to commit rows, roll back rows, or continue processing data without changing the transaction boundaries.
When you run the
mapping
task,
Data Integration
evaluates the transaction control condition for each row that enters the transformation. When it evaluates a commit row, it commits all rows in the transaction to the targets. When
Data Integration
evaluates a roll back row, it rolls back all rows in the transaction from the targets.
If the mapping has a flat file target that is created at run time, you can generate an output file each time
Data Integration
starts a new transaction. You can dynamically name each target flat file.
To use the Transaction Control transformation, you need the appropriate license.
You cannot use a Transaction Control transformation in an
elastic mapping
.

Example

You want to use transaction control to write order information based on the order type. You want to ensure that all orders of a specific type are written to a different target file. To accomplish this, you create the following mapping:
The mapping contains the following transformations in a single pipeline: Source transformation "src_Orders," Sorter transformation "srt_OrderType," Transaction Control transformation "tc_CommitByOrderType," Target transformation "tgt_OrdersByType."
The mapping contains the following transformations:
Source transformation
Configure the connection to the source ORDERS table.
Sorter transformation
Configure the sort condition to sort the source data by ORDER_TYPE.
Transaction Control transformation
Create the following transaction control condition to commit data when the Integration Service encounters a new order entry date:
Property
Value
Transaction Control Condition
If Field Value Changes
Field
ORDER_TYPE (string)
Then
Commit Before
Else
Continue Transaction
Target transformation
Create a new file target at run time and specify a dynamic file name. Use the following expression for the target name to create a different target file for each order type:
'Orders_ '||ORDER_TYPE||'.csv'