Deleting Canonical Items by Raw Item
You can delete canonical items by loading new, raw data containing a delete flag. This feature allows you to perform bulk deletions without knowing the integration key of the canonical items you wish to delete. Deleting by raw item employs Data Hub concurrent processing features for improved performance.
- Use a REST resource to mark individual canonical items as DELETED
- Load new raw items with the deleted flag set to true
Marking canonical items as DELETED using a REST call requires you to know the integration key of the items you wish to delete. It may be useful when only a few items are affected. But it is a sequential process that may have performance implications for the deletion of large numbers of canonical items.
The raw item deleted flag uses the standard Data Hub composition process to update the status of canonical items. It allows you to update many canonical items at once, without knowledge of their integration keys. It also enables the use of composition concurrency features for more efficient processing when loading and composing large numbers of raw items for deletion.
A Simple Use Case
sourceId,baseName,delete 123,Product1,true abc,Product2,true
- All new canonical items with the delete flag set to true are stored with the status DELETED
- Existing canonical items with same integration key as the incoming deleted item are updated as follows:
- If the existing canonical item has a status of either SUCCESS or ARCHIVED, its new status is ARCHIVED
- If the existing canonical item has a status of ERROR, its new status remains ERROR
- If the existing canonical item has a status of DELETED, its new status remains DELETED
- Two items with integration key 123 - one with status ARCHIVED, and one with status DELETED
- Two items with integration key abc - one with status ARCHIVED, and one with status DELETED
If implemented in the target system adapter, the adapter attempts to remove these items from the target system upon publication. Deletes are propagated to all relevant target systems.
Including New Items with Deleted Items
sourceId,baseName,delete 123,Product1,true abc,Product2,true 456,Product3,false def,Product4,
New and updated items undergo the standard compose and merge processes, as shown in the left side of the preceding figure. Deleted items undergo the process on the right, as described previously.