How to Export/Import an Azure Data Factory ARM template

One of the first questions that we would have is what is an Azure Data Factory ARM template

As Microsoft defines, it is a way to declare the objects you want, the types, names, and properties in a JSON file.

This helps us to define a way to create a template that we could use for deploying different Azure Data Factory environments.

For example, if we have a Sandbox, Test, and production environments in our company, we can start by creating the Azure Data Factory (ADF) in Sandbox on Azure portal, then we can download the ARM template, make some changes on it then we can move the changes to Test and Production.

One important change is to parametrize the ADF, this gives us the flexibility to set the parameters, for example the Azure Blob Storage, Database, Databricks server names can be parametrized, and these can be changed on the parameter file.

By doing that we only need to make changes on the parameter file to move it on different environments.

On that way by using CI/CD (Continuous integration and continuous delivery) with ARM templates we can avoid some issues by automating these changes on different environments.

After understanding the importance of using ARM templates, we are going to start with the following tutorial to Import and export ADF ARM templates by using Azure interface.

How to Export an Azure Data factory ARM template.

After you created the ADF on Azure portal and make all the desired changes you will be able to export the ARM template.

Remember that when exporting the ARM template, only ADF published changes are saved into the ARM template, If you did not publish a change, this will not be on the template.

Step 1. Creating the ADF ARM template

On ADF, go to “Manage” > “ARM template” and click on “Export”

This is going to generate a zip file that would contain the files that we need to “import the ARM template” into ADF.

Step 2. Importing the ADF ARM template

This is what we are going to see into the unzipped file obtained on the previous step.

For importing the ARM template, we are going to use only the selected files.

Go back to Manage > “ARM template” and click on “Import on Azure portal”

After clicking on “Import on Azure portal” a window will be prompt.

Then click on “Build your own template in the editor” and click on “Load file”.

Then select “arm_template.json” file that you downloaded when you exported the ARM template.

That is going to load the ARM template into the “Edit template”.

On “Custom deployment” window, click on “Edit parameters”.

Then click on Edit parameters and click on “Load file” and select the parameter’s file.

After that click on “Review + create” button and click on “Create” button.

Finally, wait and confirm into ADF that deployment completed successfully.

Leave a Reply

Your email address will not be published. Required fields are marked *