The act of upserting is useful in scenarios where you are not certain if the data you are ingesting exists on the target sink. As you learned in Chapter 3, the MERGE command is a method for performing an upsert, where an upsert will insert the data into a table if the data does not already exist or update the row if it does. The pseudocode for a MERGE command resembles the following: