ETL+ Load Upsert
Efficient updating of large tables with the upsert delta load type.
update existing records if they match a certain condition (typically based on a primary key) and insert new records if they do not exist.
Requires the source table has a unique key.
The Key+ checkboxes on the Design page designates the unique key.
Select Load to open the Design page.
Source_key
is designated as the Key+ key.Load Upsert Process – Step-by-Step
First time? If the target table is empty/has zero records
THEN run Load All and end the process here.Evaluate
<target table>.MAX(<Column with Last Modified Value>.
Scan the target table in the data warehouse for the highest/MAX value of Column with Last Modified Value in the target table.Call this value the Last Highwater mark and save this value for the following steps.
Extract from source. Extract all rows/records from the source table where
source table.Column with Last Modified Value >= Last Highwater mark.
Save the extracted rows/records into a temporary staging table.Delete Selected Rows in Target. Delete all rows in the target table where staging table.Unique Key = target table.Unique Key.
Load from Staging Table. Load (append) all rows in the staging table into the target table.
In this section
Related Pages
Search: Upsert,