The combination of insert and update in a merge statement simplifies data processing where we don't know if a record already exists.
The example below is merging into the dataset.insert_table
using data from the dataset.source_table
.
value1
is a matched we update value2
.value1
is not a match we insert a new record.QueryStash
Created: Sep 16th 2020