Hey, Unfortunately ADF doesn't handle any transactions. You would have to explicitly specify transactions and my guess is you need to create a parent Stored procedure which would in turn call all other SPs and bound them within transactions.
or create a single SP itslef.
wrapping with 1 transaction
Hello expert,
I have 4 steps. each step has its own stored procedure.
If step 2 fails, it will roll back all step, and so on.
how to wrap all of them into 1 transaction?
2 answers
Sort by: Most helpful
-
Nandan Hegde 32,831 Reputation points MVP
2022-11-18T09:16:41.92+00:00 -
MartinJaffer-MSFT 26,106 Reputation points
2022-11-18T21:48:12.15+00:00 Hello @Galih
@Nandan Hegde is correct. Data Factory does not implement transactions. Transactions are something owned and executed in your SQL server/database.
The difficulty I see in making the entire thing one transaction, is the multiple lookups outside. I'm guessing you are looping through the lookup output to do inserts using stored procedures.
There might be another way, or three.
If you do all the lookups ahead of time, you could use a Script activity to write your transaction statement, and pass in all the data at once. Maybe through the script parameters? The statement can call each of your steps.Could you share what dataset type the Lookup is operating on? I wonder if there is a way to use Copy activity instead. Copy activity does have a stored procedure option.