Skip to main content
For rows in the target table that have keys that match rows in the incoming dataset, deletes matching rows from the existing table and replaces them. For incoming rows with new keys, inserts these normally. This ensures that updated records are fully replaced instead of partially updated.
This strategy helps when your unique key is not truly unique (multiple rows per key need to be fully refreshed).

Parameters

Example: Refresh order line items

An order table uses order_id as the unique key. When a corrected order arrives, Prophecy deletes all existing rows with the matching order_id and inserts the incoming rows. Orders with new IDs are inserted normally.
Existing target tableIncoming datasetResulting target tableBecause order_id is the unique key, Prophecy deletes all existing rows with matching keys before inserting the incoming rows. In this example, both existing rows for order 101 are removed and replaced with the three incoming rows. Order 102 remains unchanged because it has no matching incoming rows, and order 103 is inserted as a new order.