Configuring Linked Service for Dev to Prod Movement in Azure Synapse Analytics

Aditya Singh 105 Reputation points
2024-04-15T07:21:19.3566667+00:00

In Azure Synapse Analytics, I have a linked service of type Azure SQL Database Managed Instance, and I have two linked services, one for dev and one for prod. How can I move from dev to prod without changing the linked service manually? How can I make it configurable?

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,504 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,808 questions
{count} votes

3 answers

Sort by: Most helpful
  1. Amira Bedhiafi 17,201 Reputation points
    2024-04-15T09:58:59.5266667+00:00

    This article suits well your case :

    Create global parameters for server name, database name, Username, and Password. It is recommended to encode the credential information in base64 format to prevent misuse. Global parameters can be passed when referencing the linked service in the dataset or pipeline.

    No alt text provided for this image

    Create parameters for server name, database name, username, and password in the linked service parameter section.

    No alt text provided for this image

    Select the server name parameter for the server name field and choose the appropriate parameters for the other fields.

    For the password, it is possible to store it in Azure Key Vault and retrieve it by specifying the secret name.

    No alt text provided for this image

    The connection details have now been parameterized. Use the test connection feature to verify the success of the connection. Pass the parameters and click on test connection.

    No alt text provided for this image

    More links :

    https://stackoverflow.com/questions/69281596/creating-multiple-environment-parameters-for-azure-data-factory-linked-services

    https://learn.microsoft.com/en-us/azure/data-factory/parameterize-linked-services?tabs=data-factory

    0 comments No comments

  2. AnnuKumari-MSFT 31,731 Reputation points Microsoft Employee
    2024-04-18T09:23:20.92+00:00

    Hi Aditya Singh ,

    Thankyou for using Microsoft Q&A platform and thanks for posting your query here.

    ADF will automatically parameterize certain things for you. To see all of the items that ADF parameterizes for you, then you can look at the file ARMTemplateParametersForFactory.json. One of the most obvious ones is the name of the ADF instance itself, as you can't have the Prod ADF instance named the same as the Dev ADF instance.

    When deploying the ARM Templates, you can pass override parameters that include custom values that are specific to each of your environments. This way you can still use 1 set of ARM Templates for all of your environments. But, when deploying to Test you'll pass in overrides that are specific to Test, when deploying to Prod you'll pass in overrides that are specific to Prod, etc.

    You can also create your own custom parameters too : Use custom parameters with the Resource Manager template

    Hope it helps. Kindly accept the answer by clicking on Accept answer button. Thankyou

    0 comments No comments

  3. Pinaki Ghatak 2,405 Reputation points Microsoft Employee
    2024-05-20T08:54:48.05+00:00

    Hello @Aditya Singh

    You can use Synapse Studio's parameterization feature to make the linked service configurable. Parameterization allows you to replace hard-coded values with parameters that can be set at runtime. To parameterize your linked service, you can follow these steps:

    1. Open your pipeline in Synapse Studio.
    2. Click on the "Publish all" button to publish your pipeline.
    3. Click on the "Add dynamic content" button next to the linked service name.
    4. Select "Add new parameter" and give it a name, such as "linkedServiceName".
    5. Replace the hard-coded linked service name with the parameter name in the linked service field.
    6. Save your changes. Now, when you run your pipeline, you can pass in the name of the linked service as a parameter. You can do this by clicking on the "Set up parameters" button before running the pipeline and entering the name of the linked service in the "linkedServiceName" parameter. This way, you can easily switch between dev and prod linked services without having to change the pipeline manually.

    I hope this helps! Let me know if you have any further questions.


    I hope that this response has addressed your query and helped you overcome your challenges. If so, please mark this response as Answered. This will not only acknowledge our efforts, but also assist other community members who may be looking for similar solutions.

    0 comments No comments