Azure Synapse Analytics: Continuous Deployment

Planning to run your Azure Synapse Notebooks through an Azure DevOps Release Pipeline? Here's a few simple steps you can follow to achieve this.

Some steps you need to cover in the Azure Synapse Workspace:

In your Synapse notebook, create a new cell and toggle parameter cell, this is for variables that would be picked from pipeline parameters, if needed.

Once done, it would look like this

Create a Pipeline in the Synapse Workspace

Add a Notebook activity in the Pipeline

image.png

Add any parameters that will be passed from the DevOps CD as Pipeline Parameters

image.png

Click on the Notebook step, head to settings and select your notebook

image.png

Add parameters that need to be passed to the notebook from the Pipeline and set them as dynamic parameters

image.png

image.png

Head over to Azure DevOps and do the following:

Create a new CD, Add an Azure PS Task, use Invoke-AzSynapsePipeline to trigger the Synapse Pipeline
Syntax:
Invoke-AzSynapsePipeline -WorkspaceName '$(WorkspaceName)' -PipelineName '$(PipelineName)' -Parameter @{ 'kv' = '$(kv)' }
Example:
Invoke-AzSynapsePipeline -WorkspaceName 'test-we-asa' -PipelineName 'test-pipeline' -Parameter @{ 'kv' = 'test-we-kv1' }

image.png

And there you go! You can now run a Synapse Notebook through Azure DevOps.