Unable to detach the Apache spark pool from synapse notebook

Sooriya E 10 Reputation points
2025-07-29T06:23:14.56+00:00

Hi, We are trying to delete an Apache Spark pool from one of our resource groups, but we’re encountering issues because it is attached to some Synapse notebooks. However, we are unable to detach it from within the workspace under the Notebooks section. We would appreciate your assistance with this.

Azure Synapse Analytics
Azure Synapse Analytics
An Azure analytics service that brings together data integration, enterprise data warehousing, and big data analytics. Previously known as Azure SQL Data Warehouse.
{count} votes

1 answer

Sort by: Most helpful
  1. Pratyush Vashistha 975 Reputation points Microsoft External Staff Moderator
    2025-07-29T09:07:03.57+00:00

    Hello Sooriya E!

    Thanks for Posting your query on Microsoft QnA Forum! I would be happy to help on the same.

    Coming to your query, to delete an Apache Spark pool in Azure Synapse that's attached to Synapse notebooks, you need to first detach the pool from the notebooks before you can delete it. This can be done through the Synapse Studio or using Azure PowerShell/CLI. I can understand from your question that you are unable to detach it from your notebook section.

    Also, could you please try the following steps to delete it if you have already not followed the same.

    Steps to Delete:

    1. Identify Notebook Dependencies: Find all Synapse notebooks that are currently using the Spark pool. You can do this by navigating to the "Manage" section in Synapse Studio, then "Apache Spark pools", and then "Attached computes". 
    2. Detach from Notebooks: For each notebook using the pool, detach it. This can be done by editing the notebook and changing the "Attached to" setting to another available Spark pool or selecting "None" to detach it. 
    3. Publish Notebook Changes: After detaching the Spark pool, ensure you publish the changes to the notebook to save the changes. 
    4. Delete the Spark Pool: Once all notebooks are detached, you can delete the Spark pool. Navigate to the Spark pool in the Synapse Studio and click the ellipsis (...) next to the pool name, then select "Delete". 
    5. Use PowerShell/CLI (Optional): Alternatively, you can use PowerShell or Azure CLI to remove the Spark pool. The commands are:
      • PowerShell: Remove-AzSynapseSparkPool -WorkspaceName <workspace_name> -Name <pool_name> Learn Microsoft 
      • Azure CLI: az synapse spark pool delete --name <pool_name> --workspace-name <workspace_name> -g <resource_group_name>

    For more assistance, could you please share some screenshots of the screen where you are facing this error?

    Also, you can refer to the similar issues users have faced in past, this would help you to troubleshoot the issue further.

    Issue 1

    Issue 2

    Please "Accept as Answer" or Upvote if the response provided is useful, so that you can help others in the community looking for remediation for similar issues.

    Thanks

    Pratyush

    0 comments No comments

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.