In this blog I will show you how to override pipeline parameter values when releasing a synapse workspace. This blog does not cover the Azure DevOps setup or the setup of the workspace release, it is purely about how to override parameters in the synapse deployment task.

By default, the parameter template called “TemplateParametersForWorkspace.json” is used by Synapse, this can be seen in the workspace_publish branch in Repos in Azure DevOps. To override this template the first step is to create a new template file called “template-parameters-definition.json” (it has to be called this exactly), this must be placed in the root of the collaboration branch (called “Development” in this example):

This custom template allows you to expose parameters for different items in the workspace such as pipelines, triggers, linked services, etc. In this blog I will focus on pipeline parameters. There are multiple configurations you can use for this but I prefer this setup:

Here I expose all properties under the parameter property using “*”, and I keep the default parameter values using “defaultValue”: “=”. Further information on the different properties and configuration options can be found here.

The next time the “Development” branch is published from the synapse workspace, the file “TemplateParametersForWorkspace.json” in the workspace_publish branch in Azure DevOps will be regenerated, the output is based on the content of the “template-parameters-definition.json” created earlier. In my demo workspace I get the following:

At this point, make a note of the path to the pipeline parameter (here it is “TestPipeline_properties_parameters_SourceFilePath_defaultValue”), then go to the synapse deployment task in the release. In the OverrideParameters section add the path with the override value as shown here:

When the workspace is released the parameter value is replaced with the value from the deployment task:

This isn’t the most straightforward but when set up correctly it works quite well!

Tags: ,