Configure the transaction control condition on the Transaction Control tab. The transaction control condition tests each row to determine when to commit rows, roll back rows, or continue without any transaction changes.
The following image shows the Transaction Control tab:
Note: Before you specify the transaction control condition, verify that the incoming data is sorted. Incoming data must be sorted by the fields that you use in the transaction control condition.
You can use one of the following types of conditions to test the row data:
If Field Value Changes
Use an If Field Value Changes condition when you want to test whether a field value changes. For example, if ORDER_DATE changes, then commit the transaction before writing the current row to the target. Otherwise, continue processing the data.
Select the field to test from the Field list.
Advanced
Use an advanced condition when you want to use an expression to test the row data. For example, if NEW_FILE_FLAG=’Y’ AND DEPT_ID>1000, then commit the transaction but include the current row in the next transaction. Otherwise, continue processing the data.
Configure the expression in the If part of the condition. The expression can use fields, parameters, built-in functions, and user-defined functions.
Parameterized
You can use an expression parameter to represent the condition. Enter the parameter value when you run the mapping task or enter the value in a parameter file.
You can specify the following actions for the Then and Else parts of the condition based on the test results:
Action
Description
Continue Transaction
Data Integration does not perform any transaction change for this row.
Commit Before
Data Integration commits the transaction, begins a new transaction, and writes the current row to the target. The current row is in the new transaction.
Commit After
Data Integration writes the current row to the target, commits the transaction, and begins a new transaction. The current row is in the committed transaction.
Rollback Before
Data Integration 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.
Rollback After
Data Integration 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.
The Then and Else parts of the condition must contain different actions.