How to enable Transaction and Rollback functionality in ADF Pipeline (Source and Sink is Azure SQL Database)

Ashok Prathap 20 Reputation points
2023-06-14T07:47:50.6366667+00:00

How to enable Transaction and Rollback functionality in ADF Pipeline

  1. Source - Azure SQL Database
  2. Sink - Azure SQL Database

In my pipeline, I have 5 Dataflows (1Dataflow for 1 Table - Totally 5 Tables) and which will run sequentially.
For example:

  • if any failure happen on 3 Dataflow then it has to rollback all the first 2 Dataflows changes also.

Transaction_Commit_Rollback_Error

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,624 questions
0 comments No comments
{count} votes

Accepted answer
  1. ShaikMaheer-MSFT 38,546 Reputation points Microsoft Employee Moderator
    2023-06-15T10:04:29.82+00:00

    Hi Ashok Prathap,

    Thank you for posting query in Microsoft Q&A Platform.

    Azure Data factory is just an ETL service. It will use compute of storages to perform data movement and transformations. In your scenario, once a dataflow runs that means data inserted to your SQL table as well. ADF dataflows uses here SQL engine behind the seen to insert this data. So, if we want to roll back any changes, then we should relay on same SQL engine. You can consider have a flag column in the destination tables to identify latest run rows and consider them deleting if any failure on the pipeline.

    So you can have a new pipeline or within same pipeline at the end, logic to check is all dataflows run well. if not, based the flag column value delete the rows from destination tables.

    Hope this helps. Please let me know if any further queries.


    Please consider hitting Accept Answer button. Accepted answers help community as well.


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.