Hello azure_learner ,
Use this PowerShell script to iterate through parameter sets for cost reduction in ADF:
- Create a
ParameterSets.json
file with parameter sets:[ { "Parameter1": "Value1", "Parameter2": "Value2" }, { "Parameter1": "AnotherValue1", "Parameter2": "AnotherValue2" } ]
- PowerShell script:
Import-Module Az.DataFactory $DataFactoryName = "YourDataFactoryName" $ResourceGroupName = "myResourceGroup" $PipelineName = "Adfv2QuickStartPipeline" $ParameterSets = Get-Content -Path ".\ParameterSets.json" | ConvertFrom-Json foreach ($ParameterSet in $ParameterSets) { $ParameterHash = @{} foreach ($key in $ParameterSet.PSObject.Properties.Name) { $ParameterHash[$key] = $ParameterSet.$key } Invoke-AzDataFactoryV2Pipeline ` -DataFactoryName $DataFactoryName ` -PipelineName $PipelineName ` -ResourceGroupName $ResourceGroupName ` -Parameter $ParameterHash Write-Host "Pipeline executed successfully with parameter set:" $ParameterHash }
References
If the information helped address your question, please Accept the answer.
Luis