I have an .sql delta file that contains updates and deletions to a database tables. I have a database that contains the same tables that the delta is made for to update. Within Azure Data Factory what is the approach to achieve updating my database with this delta?
Delta is stored in Azure Blob Storage I have a linked service with connection to my MySQL database.
The delta contains sql statements like Insert, Delete From etc...
To process .sql
file in ADF you can use lookup to get the queries from file as below
set row and column delimiter as ;
.
Lookup Output:
Now to execute them in MySQL take foreach loop to pass each query to lookup under it.
In lookup attach MySQL liked service and query with expression @concat(item().Prop_0,'; select 1 as demo;')