Rename an Azure Data Factory

As you might have noticed; It is not possible to rename an Azure Data Factory. So what do I do if I want to give it a new name?

In this post, I will show you one way of doing this.

The basic steps will be:

  1. Open your existing Data Factory
  2. Export it as an ARM Template
  3. Create an “empty” Data Factory with the new name
  4. Change the name of the Data Factory in the parameter file in your ARM template
  5. Deploy your ARM Template

First of all, you should open the Data Factory that you would like to rename. Then export this as an “ARM Template”

Export ARM template

Unzip the files to a folder.

Change the name of the Data Factory in your parameter file (arm_template_parameters.json). In my case, I would like to call it MyFactoryName.

Change file

Then open PowerShell (it requires you to have Azure PowerShell installed)

Authenticate by writing this command:

Connect-AzAccount

Then create an empty Azure Data Factory by writing this command

New-AzDataFactoryV2 -ResourceGroupName MyResourceGroupName -Name MyFactoryName –Location "westeurope"

To deploy your existing ARM Template to Azure

New-AzResourceGroupDeployment -Name MyFactoryName -ResourceGroupName MyResourceGroupName -TemplateFile C:\Users\username\Downloads\arm_template\arm_template.json -TemplateParameterFile  C:\Users\username\Downloads\arm_template\arm_template_parameters.json -Verbose

I like adding the -Verbose flag to see all the details.

Deploy

If everything works out your new “copy” will appear in the portal.

Leave a Reply

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

WordPress.com Logo

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

Google photo

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

Twitter picture

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

Facebook photo

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

Connecting to %s