I have a flow that runs daily and outputs a daily snapshot of data into a SQL table. I also have a table with historical data that I created using a one-time load in my flow.
What I am trying to do is: every time my flow runs the daily snapshot, I want to compare this daily output with what is already in the historical table, and only insert new data into the historical table.
My unique key consists of the combination of: itemID, storage_location, workweek
What is the best way to do this? I have tried doing a join between the two tables and taking the left side and outputting it to "Update; Insert if New", but I am running into an issue that says "Primary Key Required for Update option" despite specifying the key.
What are some other ways that I can achieve what I am trying to do?