IBM Tivoli Directory Integrator
The Delta Component provides lookup, add and delete access to the
Delta services outside of the normal Connector modes. The Delta Function
Component allows the Delta functionality to be placed anywhere in
the AssemblyLine. This way entries read from the input source can
be modified before computing the Delta changes and applying them to
the Delta Store.
The Delta Function Component has the following parameters:
- Unique Attribute Name
- The name of an attribute that holds a unique value in a given
data source. Data sources with duplicate keys cannot be subjected
to the delta function, except when Allow
duplicate Delta keys is enabled.
- Delta Store
- The table in the System Store that holds the Delta information
from previous runs for this Connector, so as to be able to detect
differences on subsequent runs. When this parameter is empty a default
name composed from the "AssemblyLines" literal string, the
AssemblyLine name and the component name is used (for example, "AssemblyLines_AL1_DeltaFunc").
- Read Deleted
- If checked, the AssemblyLine will inject deleted entries into
the AssemblyLine run when the Iterator has completed iterating, that
is, finished input. The operation code will indicate that this Entry
was deleted in the input source. Note that delete-tagged Entries are
not removed from the Delta Store unless you also enable the Remove
Deleted flag.
- Remove Deleted
- If checked, the deleted entries from the input source are deleted
from the Delta Store, such that they will not be detected again in
subsequent runs.
- Return Unchanged
- If checked, any unchanged entries in this run are injected into
the AssemblyLine.
- Commit
- Selects when to commit changes to the Delta Store as a result
of iterating through the input. Choices are:
- After every database operation
- On end of AssemblyLine Cycle
- On Connector close
- No autocommit
The default is After every database
operation.
- Row Locking
- Selects the transaction isolation level for the connection to
the Delta Store. For more information refer to subsection "Row
Locking" in section "Delta feature for Iterator mode"
in IBM TDI V7.1 Users Guide. Possible values are:
- READ_UNCOMMITTED
- READ_COMMITTED
- REPEATABLE_READ
- SERIALIZABLE
The default is READ_COMMITTED.
- Faster algorithm
- When checked, instructs the AssemblyLine to use a faster algorithm
to compute changes, at the expense of more memory use. In essence, it does not write unchanged entries to the Delta store; instead it
remembers keys in memory if Read Deleted is
set to true.
- Allow duplicate Delta keys
- When the Delta feature is enabled for Changelog/Change Detection
Connector in long running AssemblyLines, an Entry can be modified
more than once. These modifications will result in receiving the Entry
a second time and this will cause the Duplicate delta key exception
to be thrown. Checking this parameter allows Entries with duplicate
key attributes (specified in the Unique
Attribute Name parameter) to be processed by Iterator Connectors
with enabled Delta.
- Attribute List
- A comma-separated list of attributes whose changes will
be detected or ignored during the compute changes process. The changes
in listed attributes will be affected by the Change
Detection Mode parameter that specifies whether to ignore or
detect them. For more information about this parameter see subsection "Detect
or ignore changes only in specific attributes" in section "Delta
feature for Iterator mode" in IBM TDI V7.1 Users Guide.
- Change Detection Mode
- Specifies changes in which attributes will be detected or ignored.
For more information about this parameter see subsection "Detect
or ignore changes only in specific attributes" in section "Delta
feature for Iterator mode" in IBM TDI V7.1 Users Guide.
The Delta Function Component provides the same functionality as
an enabled Delta tab for connectors in Iterator mode; see section "Delta"
in IBM TDI V7.1 Users Guide. This function component allows Delta
detection and applying logic to be placed anywhere in the AssemblyLine.
Since the Delta FC is a function component it requires an Entry
on which to perform its Delta function. Therefore when the input source
reaches end of data, the Delta component will have nothing to process.
So when the Read Deleted parameter
is selected the deleted entries will be returned by the Delta Function
Component only if you feed the component with some dummy empty entries.
These entries will signal the function component to start returning
any deleted entries.
Similar to an Iterator connector with Delta enabled, the Delta
Function Component displays delta statistic at the end of Assembly
Line execution (for example, "Add:3, Modify:1, CallReply:5, Skip:2, Nochange:2").
The following example demonstrates how to synchronize an input
source with the TDI Delta Store using the Delta FC when the Read Deleted parameter is enabled. The
deleted entries from the input source will be marked with a
delete delta operation and returned to the AssemblyLine.
Steps to execute:
- Add connector(s) in Iterator mode that will iterate over the input
data source.
- Add a Script Connector as the last connector in the Feed section.
- Add this code in its getNextEntry() method:
r = task.getResult();
if (r != null){
if (r.size() > 0){
entry = system.newEntry();
result.setStatus(1); // OK
} else {
result.setStatus(0); // end of input
}
}
- Add some custom logic or components that modify the work entry.
- Add Delta Function Component and configure it to iterate over
deleted entries.
- Start the AssemblyLine.
- Delete some entries in the input data source.
- Start the AssemblyLine again and receive the deleted entries tagged
as
delete.
At the end the DeltaFC will return a dummy empty
entry. Checking this entry can be used by the Script Connector's
getNextEntry() method to determine when to stop returning dummy entries.
An empty entry is also returned when there are no deleted entries
and Read Deleted is enabled.