'How to Publish Azure Data Factory Changes using PowerShell?
How to Publish Azure Data Factory Changes using PowerShell? Using portal, we click on the "Publish" button and save the ADF changes. How to achieve same thing using Azure PowerShell/REST API/ARM template?
Solution 1:[1]
You can use the PowerShell module azure.datafactory.tools, created specifically for that goal. It is free and open-source located in the following GitHub repo: https://github.com/SQLPlayer/azure.datafactory.tools
PS module is available via PowerShell Gallery.
It's very well documented, so I'm not gonna copy/paste the documentation here, just worth to mention you need just one command to publish ADF from selected location:
Publish-AdfV2FromJson -RootFolder "$RootFolder" -ResourceGroupName "$ResourceGroupName" -DataFactoryName "$DataFactoryName" -Location "$Location"
Disclaimer:
I'm the author of the module which does not deploy ADF using ARM Template. If you want to understand better what's the differences, read this blog post:
Two methods of deployment Azure Data Factory
Solution 2:[2]
We use the exact same method Publish-AdfV2FromJson but any updates we do gets deployed in the development branch but not in other environments through CI.
We are also using -Option $opt where $opt is defined as:
$opt = New-AdfPublishOption
$opt.Excludes.Add("integrationruntime.*", "")
$opt.Excludes.Add("trigger.*", "")
$opt.DeployGlobalParams = $false
$opt.StopStartTriggers = $false
My hunch says the new ARM template is not getting overwritten but not sure how to fix that.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Kamil Nowinski |
| Solution 2 | Minesh D. |
