In your case, if you wish to update different columns based on update vs. insert, then you are better off using a Conditional Split and having a separate Update path and Insert path rather than trying to club it all together into a single Upsert path logical flow.
ADF - Upsert into SQL without updating certain (non-key) columns
Hi,
When using Upsert as the Update Method for a SQL db Sink in a Data Flow, we can define the Key Columns which of course are used to identify the row to update, if it exists.
Is it possible to also define other columns which are not key columns and yet should not be updated, even if the record already exists?
The situation here is I'm using a data flow to generate a number of columns, and then upserting to a SQL db. Two of those columns, for example, are a UUID, and a "RowInsertedAt".
If the Data Flow runs multiple times, some of the columns should update with new information, but I don't want to overwrite the UUID or the RowInsertedAt, both of which are currently being injected in the Data Flow. However, these columns cannot be Key Columns, as they are not 'known' at time of injection. If they were defined as Key Columns, no rows would ever be updated, and instead new rows would be created every time.
Azure Data Factory
1 answer
Sort by: Most helpful
-
MarkKromer-MSFT 5,226 Reputation points Microsoft Employee Moderator
2022-02-07T20:18:44.707+00:00