I have a couple of Synapse Note books. When I try to delete them and publish I get the following Error. As the Error suggested I tried renaming and publishing. Still doesnt let me do it. Is it possible to get rid of these reference from the entire Synapse workspace? enter image description here
Error while publishing: DeleteNotebook failed: [statusCode from ADF: BadRequest, ErrorMessage: {"code":"BadRequest","message":"The operation failed because the entity 'NB_Create_FormattedTables' is being renamed to 'NB_Create_FormattedStagingTables'. A retry of rename from exact source to target may work.","target":"/subscriptions/00ab980-f62a-412a-b937-fsdfd/resourceGroups/rg-r-dev-ne/providers/Microsoft.Synapse/workspaces/synw-r-dev-ne/notebooks/NB_Create_FormattedStagingTables","details":null,"error":null}, Workspace: synw-researchdatasets-dev-ne, NotebookName: NB_Create_FormattedStagingTables, ArtifactId: sdfsf-230f-435-b753-ag434]
I tried Renaming the Note books as suggested and it did not work
Step 1: One way to try is renaming the notebook back to its original name and then deleting it again.
Step 2: You can try the steps below:
Clone the original notebook and rename it as a copy of the original notebook.
Publish the changes.
Then, delete the original notebook and rename the cloned notebook to the original notebook name.
When you attempt to delete the notebook, you will be prompted that upon publishing, your notebook will be deleted. Click on publish and see if your notebook is deleted.
Step 3: If the steps mentioned earlier do not resolve the issue, you can try another method using PowerShell commands. First, check if you have the
Az moduleavailable by running the following command:This command will list the available Az modules. To ensure you have the latest version, run:
These PowerShell commands can help you manage your Azure resources, including working with Synapse workspaces and notebooks.
Next, you can run the following commands in PowerShell to import the Az.Synapse module and list all available commands for managing Azure Synapse workspaces:
Import the Az.Synapse module:
List all commands available for Azure Synapse workspace:
These commands will help you import the Azure Synapse workspace module in PowerShell and view the available commands for managing your Synapse workspace.
After running the
Get-Command -Module Az.Synapsecommand, locate theRemove-AzSynapseNotebookcommand from the list of available commands.After running the
Remove-AzSynapseNotebookcommand, you will be prompted to confirm the Azure Synapse workspace name and the notebook name that you want to delete. You will then be asked to confirm the deletion by pressing either Y for yes or N for no.After you press Y, refresh the Synapse workspace and check the Notebook; it will no longer be there in the workspace.