Azure synapse - SQL pool stored procedure - parameterize sql pool name in arm template

_user_unknown_ 1 Reputation point

I am adding a SQL pool stored procedure in synapse pipeline.
In dev environment, I have selected the dedicated SQL pool name. But now when trying create arm template for PROD deployment, I want to parameterize that the pipeline dependency, so that I am able to set the value as per the environment.

Right now in my template file, the pipeline json has:

"dependsOn": [
"[concat(variables('workspaceId'), '/sqlPools/dev_sql_pool')]"

But the deployment in other environment fails, because instead of dev_sql_pool we have prod_sql_pool in higher env.

How to parameterize it ?

Also in the activity json I have:

"sqlPool": {
"referenceName": "dev_sql_pool ",
"type": "SqlPoolReference"

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.
4,329 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AnnuKumari-MSFT 30,361 Reputation points Microsoft Employee

    Hi @_user_unknown_ ,
    Welcome to Microsoft Q&A Platform and thanks for posting your question.
    In your release pipeline, you can Add Run Inline Azure Powershell task with the following code. This can help in renaming any resource , not only Dedicated sql pool , but any string that you want to rename for higher environments.

    Make sure the String that you are going to replace is not used anywhere else except the place you want to rename .


     (Get-Content -path $(System.DefaultWorkingDirectory)/_SynapseRepo/annu-analytics/TemplateForWorkspace.json) -replace 'dev_sql_pool ','prod_sql_pool ' | Set-Content -Path $(System.DefaultWorkingDirectory)/_SynapseRepo/annu-analytics/TemplateForWorkspace.json   
    • You need to replace _SynapseRepo with the ArtifactName you have set for the release pipeline. Refer to the below image.


    • annu-analytics should be replaced by your SynapseWorkspace name

    Hope this will help. Please let us know if any further queries.


    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you.
      Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators