Hi @arkiboys ,
Thank you for posting query in Microsoft Q&A Platform.
Your implementation looks like SCD type2 to me, where you are trying to find out new rows and also existing rows. If existing rows then update and if new rows then insert.
In these kind of implementations Dataflow settings which helps to order sinks plays key role to avoid these kind of issues.
Kindly try to order the sinks by analyzing your requirement. For example, If you feel first doing updates and then doing inserts helps you, then consider ordering them in data flow settings and see if that helps. It can be reverse order as well. Please think all kind of scenarios based on your data and implementation and choose sink order wisely.
For example, here I chosen update to happen first and then insert.
Please check video of SCD type1 to get idea.
Slowly Changing Dimension(SCD) Type 2 Using Mapping Data Flow in Azure Data Factory
Hope this helps. Please let us know if any further queries.
--------
Please consider hitting Accept Answer. Accepted answers help community as well.