Connectors in Update mode, usually referred to as Update Connectors, are used for adding and modifying data in a data source. For each entry passed from the AssemblyLine, the Update Connector tries to locate a matching entry from the data source to modify with the values of the entry attributes received. If no match is found, the Update mode Connector will add a new entry.
As with Lookup Connectors, tell the Connector how you define a match between data already in the AssemblyLine and that found in the connected system. This is called the Connector's Link Criteria, and each Update Connector has an associated Link Criteria (see Link Criteria) tab where you define the rules for finding matching entries. If no such entry is found, a new entry is added to the data source. However, if a matching entry is found, it is modified. If more than one entry matches the Link Criteria, the Multiple Entries Found Hook is called. Furthermore, the Output Map can be configured to specify which attributes are to be used during an Add or Modify operation.
When doing a Modify operation, only those attributes that are marked as Modify (Mod) in the Output Map are changed in the data source. If the entry passed from the AssemblyLine does not have a value for one attribute, the Null Behavior for that attribute becomes significant. If it is set to Delete, the attribute does not exist in the modifying entry, thus the attribute cannot be changed in the data source. If it is set to NULL, the attribute exists in the modifying entry, but with a null value, which means that the attribute is deleted in the data source.
An important feature that Update Connectors offer is the Compute Changes option. When turned on, the Connector first checks the new values against the old ones and updates only if and where needed. Thus we can skip unnecessary updates which can be valuable if the update operation is a heavy one for the particular data source you are updating.
Some Update Connectors offer the option to skip unneccessary lookups when doing Updates. If the Connector supports it, we will see a Skip Lookup check box next to the Compute Changes check box. When selected, it changes the behavior of the Connector so that no lookup is performed to find an entry that corresponds to the link criteria. For this reason no Before/After Lookup hooks are invoked. Also the On Multiple Entries hook cannot be invoked. With this option turned on only search criteria is built and modify is called directly. This differs from the default connector behavior in Update mode because if no entry is found with the link criteria it is not added as a new one.
Parent topic: Connector modes