0

I have deleted an activity and I cant see a way of undeleting it.

Googling just pushes me towards reverting Git versions, which seems way too high level for a simple undo of a change like this.

In notebooks there is a basic undo button that allows a single undo. That would be useful at least, but I would like to have a longer history of undos.

david
  • 7
  • 2

2 Answers2

0

unfortunately, there is no undo button currently in Azure Synapse pipelines or Azure data factory.

Chen Hirsh
  • 736
  • 1
  • 1
  • 13
  • 2
    I was afraid that was the answer. The more I work with this tool the less I want to work with it. – david Apr 13 '23 at 13:50
0

While it is not a simple Undo button, there are several ways to recover a deleted activity.

First: if you have not committed the pipeline change yet, you can close the tab and discard changes. This is probably the easiest way, but you will also lose any other changes you may have made, so just be aware of that.

Second: if you are working Git branches (and hopefully you are), you can open the main branch in another browser window and copy and paste the activity in the UI from main back into your working branch. Sometimes it is a little wonky, so YMMV.

Third: many people aren't aware, but you can edit the pipeline code directly:

enter image description here

This will bring up a JSON code editor:

enter image description here

If you have access to the Git repo, you can copy and paste the missing JSON from the file in Git (again, most likely in main) into this UI and click "OK" to save the changes. This will bring the activity back into your pipeline.

BE WARNED: this approach can be very powerful, but messing around in this JSON can have unintended consequences, so be very sure about what you are doing if you go this route.

Joel Cochran
  • 7,139
  • 2
  • 30
  • 43
  • Thanks Joel. This is pretty much what I was expecting. The irony of the JSON structure is that should make it relatively easy to hold a history of changes in a development session – david Apr 14 '23 at 08:26