Search code examples
azure-synapse

Notebooks can't be deleted from Synapse Live


My project is using Azure Synapse instance connected to ADO GIT. A spark pool issue requires deleting the spark pool, which can't be done without removing all references. I disconnected the GIT and tried to delete all notebooks from the live session:

  1. Notebook is selected and deleted -> Synapse notifies about deletion and creates a publish prompt
  2. The deletion is published using "Publish All" -> Synapse generates "Publish all - pending changes" showing the notebook will be deleted
  3. Publish is confirmed -> Synapse generates "Publish completed" notification

The process seems to remove the notebook, but when the browser is refreshed, the "deleted" notebook is present again.

I've tried two work-arounds w/o success:

  • Delete from thru context menu (process is identical; same results)
  • Connected and empty repo and push it into "Publish branch" (resulted in loss of other objects like configuration files, but notebooks are remaining in place)

Does anyone has an idea how to force notebook deletion from the live workspace?


Solution

  • It seems like the notebook deletion process is not being completed successfully. May be the notebook is still open in another browser tab or window Please check foor this.

    Restart the synapse woerkspace and then try to delete the notebook again.

    You can follow these stpes Open the Azure Synapse Studio and go to the workspace where the notebook is located. Click on the Notebooks tab and locate the notebook(Your Notebook) you want to delete. Right-click on the notebook and select "Delete" from the context menu. Confirm the deletion when prompted. Refresh the browser page to ensure that the notebook has been successfully deleted.

    enter image description here enter image description here If the above steps do not help resolve the issue the second way you do is Via Power shell command.

    Get-Module Az -ListAvailable

    Run this Command in the power shell you can check if you have the latest version by running the following command: enter image description here

    Next Run the below commands to Import-Module Az.Synapse and Get-Command -Module Az.Synapse to list all commands availble for the azure synapse workspace. and import the Azure synapse workspace module on the power shell.

    enter image description here

    After you run the Get-Command -Module Az.Synapse command look for the Remove-AzSynapseNotebook command from the list. enter image description here Once you run the Command the Remove-AzSynapseNotebook It will ask you to confirm you Azure synapse workspace name and the Notebook name that you want to Delete. It re confirms to Press Y or N

    enter image description here After I press Y I refershed the Synapse workspace and checked the Notebook I created I no longer there in the workspace.

    enter image description here