My flow is getting data from one database and inputting the data into another. Because I want to Insert/Update the data in the target table I insert the data into a staging table. Afterwards I merge the staging table with the "final" table and truncate the staging table.
However if some data gets put into the staging table in the meantime (between merge and truncate) then I lose that data.
How could i model the flow to make sure this does not happen?
Below is my current "wrong" implementation.