Azure Synapse CI/CD Pipeline - Override Apache Spark Pool Name in Notebooks

Tsu Kernik 0 Reputation points
2024-07-30T12:12:14.7433333+00:00

I'm working on setting up a CI/CD pipeline for an Azure Synapse workspace, and I need to create custom parameters in the deployment process to handle environment-specific values. Specifically, I need to override the Apache Spark pool name used in the development environment (synDEVSPark) to the production Apache Spark pool name (synPROSPark1).

I've followed the instructions from the Microsoft documentation, but I'm encountering an error during the synapse deployment task.

Here are the steps I've taken:

  1. Created a template-parameters-definition.json file to define the parameters (shown in the image below).template-parameters-definition
  2. Set up the override parameter in the Synapse deployment task (shown in the image below:OverrideParameters-redacted
  3. Created a pipeline variable to hold the production Apache Spark pool name (shown in the below image). pipeline variable Despite these efforts, the deployment fails with the following error (shown in the image below): Failed to fetch the deployment status {"code":"400","message":"CreateOrUpdateNotebook failed: [statusCode from ADF:BadRequest, ErrorMessage:{\"code\":\"BadRequest\",\"message\":\"The document creation or update failed because of invalid reference 'synDEVSPark'... mensaje de error How can I correctly override the Apache Spark pool name in the Synapse deployment task to ensure it uses the production Spark pool (synPROSPark1) instead of the development Spark pool (synDEVSPark)? Is there a specific way to reference the Apache Spark pool in the parameters, considering it is not a linked service? Any help or guidance on what I might be doing wrong or how to properly configure the override parameters would be greatly appreciated. Thank you!
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. Smaran Thoomu 32,530 Reputation points Microsoft External Staff Moderator
    2024-08-01T05:45:47.3666667+00:00

    Hi @Tsu Kernik

    Thanks for the question and using MS Q&A platform.

    Please correct me if my understanding is wrong. You are looking to parameterize the Notebook parameter, to replace your Spark pool name with a different value (without the default value) when deploying to a higher environment. You can use the below code in your template-parameter-definition file. This code will expose the notebook parameters.

    "Microsoft.Synapse/workspaces/notebooks": {
    
            "properties": {
    
                "bigDataPool": {
    
                    "referenceName": "="
    
                },
    
                 "metadata": {
    
                    "a365ComputeOptions": {
    
                            "id": "=",
    
                             "name": "=",
    
                            "endpoint": "="
    
                    }
    
                }
    
            }
    
         }
    
    

    on the next step, go to the Workspace Deployment task in your Release Pipeline and add these new parameters in the “OverrideParameters” section. Here I have added Notebook 1_properties_bigDataPool_referenceName = DemoUAT ( to change the sparkpool name from demo to DemoUAT)

    User's image

    User's image

    I hope this helps. Please let me know if you have any further questions.


Your answer

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