Parameterize Linked Service in Azure Data Factory

A relatively new feature in Azure Data Factory is support for parameterization of Linked Services. You can find more details about Linked Services in Azure Data Factory in this previous post.

Parameterization allows the same linked service to be used for multiple data sources of the same type. e.g. we can now parameterize the connection properties such as the database name, username etc.  in the Linked Service definition, if we want to connect to multiple databases. This means that there is no need to create a new Linked Service for every database.

  1. To create a parameter, navigate to the Linked Services page and click on the existing Linked Service (or create a new one). This will open the Edit Linked Service blade:

Clicking on the text box for the property will bring up the “Add dynamic content” link, if the property supports parameterization

  1. As shown in the picture above, you can click on the “Add dynamic content” link to parameterize the Database Name for the Azure SQL Database linked service.

This will bring up a new Add dynamic content blade:

  1. Click on the “+” sign highlighted in the picture above to create a new parameter. This will bring up yet another blade as shown below. Create a parameter name DBName with an optional default value and click on Save to close the blade.
  1. Click on the Parameter Name to add it to the Add dynamic content text box on the previous blade. Click Finish to close.

This will parameterize the Database name property for the Linked Service.

Repeat the process for other properties that you would like to parameterize. Don’t forget to publish to save the changes when done.

The next step would be to learn how to pass the database name to parameterized Linked Service, within Azure Data Factory Pipeline. This will be discussed in a future post.

For a detailed list of Linked Services that can be parameterized and quick video on the topic, please see the reference MS Docs page below.


2 thoughts on “Parameterize Linked Service in Azure Data Factory

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: