Skip to main content
Feedback

Collection item operations

Incoming entities can perform operations on individual collection items if key-based matching is enabled. These operations are defined using the op attribute in the source entity's collection wrapper element, with possible UPSERT or DELETE values.

  • If for a collection item in an entity for which an UPSERT action is specified, there is in the matching golden record a collection item with a matching key field value, the item in the golden record is updated. Otherwise, the item in the entity is appended to the collection in the golden record.

  • If for a collection item in an entity for which a DELETE action is specified, there is in the matching golden record a collection item with a matching key field value, the item in the golden record is removed.

  • Default behavior: When you don't specify an action for the incoming entity items, DataHub end-dates and removes all the existing collection items and inserts all the new items from the incoming entity. The golden records will no longer have the previous collection items unless they are included in the incoming entity.

Existing golden record collection itemsIncoming entity collection itemsOp TypeResulting golden record collection itemsExplanation
Jim

Jimmy

Jamie

UPSERTJim

Jimmy

Jamie
The item in the collection in the entity did not match any items in the collection in the golden record. Since the op is UPSERT, if the entity is incorporated in the domain, the item would be appended to the existing collection in the golden record.
Jim

Jimmy
Jim

DELETEJimmy

The item in the collection in the entity matches the first item in the collection in the golden record. Since the op is DELETE, if the entity is incorporated in the domain, the item would be removed from the existing collection in the golden record.
Jim

Jimmy
Jamie

Jamie

The item in the collection in the entity did not match any items in the collection in the golden record. Since the op is not specified, if the entity is incorporated in the domain, the item would replace the existing collection in the golden record.