Azure Data Factory (ADF) continues to evolve with powerful features that simplify data integration and transformation. One of the latest additions is the ability to perform an upsert operation using the Copy Data Activity. In this blog, Austin Libal from Pragmatic Works explains how this feature works and why it’s a game-changer for data engineers and analysts.
An upsert combines two operations: update and insert. This means you can update existing records and insert new ones in a single process. For example:
This feature is particularly useful for ETL workflows where data changes frequently. Instead of running separate insert and update processes, you can streamline operations with upsert, saving time and reducing complexity.
dbo.upsert containing product IDs and list prices from the AdventureWorks sample database.ProductID) to determine whether a row should be updated or inserted.When the pipeline runs:
After running the upsert, Austin verified that:
This tutorial is just one example of the practical training offered by Pragmatic Works. If you want to master Azure Data Factory, Synapse Analytics, and other Azure tools, explore our On-Demand Learning Platform. Gain access to comprehensive courses, boot camps, and expert tips to accelerate your data career.
Don't forget to check out the Pragmatic Works' on-demand learning platform for more insightful content and training sessions on Azure Data Factory and other Microsoft applications. Be sure to subscribe to the Pragmatic Works YouTube channel to stay up-to-date on the latest tips and tricks.