Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to upsert/insert records in all tables in an Azure SQL Database with Azure Data Factory v2

I have an Azure SQL database with many tables that I want to update frequently with any change made, be it an update or an insert, using Azure Data Factory v2. There is a section in the documentation that explains how to do this. However, the example is about two tables, and for each table a TYPE needs to be defined, and for each table a Stored Procedure is built. I don't know how to generalize this for a large number of tables. Any suggestion would be welcome.

like image 729
Arthur Nieuwland Avatar asked Nov 07 '22 03:11

Arthur Nieuwland


1 Answers

You can follow my answer https://stackoverflow.com/a/69896947/7392069 but I don't know how to generalise creation of table types and stored procedures, but at least the metadata table of the metadata driven copy task provides a lot of comfort to achieve what you need.

like image 128
Greg Holst Avatar answered Nov 14 '22 16:11

Greg Holst