本文介绍了发布后如何获取Azure数据工厂参数到ARM模板参数文件(ARMTemplateParametersForFactory.json)中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试为 Azure 数据工厂创建 Azure DevOps 发布管道.

我遵循了微软相当神秘的指南(

所以在我的例子中,它必须是这样的:

如果您在单独的分支中工作,则可以通过从数据工厂下载 arm 模板来测试您的配置.当您更改参数定义时,您必须重新加载浏览器屏幕 (f5) 以刷新配置.

如果你真的想参数化所有管道中的所有参数,以下应该有效:

"Microsoft.DataFactory/factories/pipelines": {特性": {参数":{*":{默认值":="}}}}

我更喜欢指定要参数化的参数:

"Microsoft.DataFactory/factories/pipelines": {特性": {参数":{LogicApp_RemoveFileFromADLSURL":{"defaultValue":"=:-LogicApp_RemoveFileFromADLSURL:"},LogicApp_RemoveBlob":{"defaultValue":"=:-LogicApp_RemoveBlob:"}}}}

I am trying to create my Azure DevOps release pipeline for Azure Data Factory.

I have followed the rather cryptic guide from Microsoft (https://docs.microsoft.com/en-us/azure/data-factory/continuous-integration-deployment ) regarding adding additional parameters to the ARM template that gets generated when you do a publish (https://docs.microsoft.com/en-us/azure/data-factory/continuous-integration-deployment#use-custom-parameters-with-the-resource-manager-template )

Created a arm-template-parameters-definition.json file in the route of the master branch. When I do a publish, the ARMTemplateParametersForFactory.json in the adf_publish branch remains completely unchanged. I have tried many configurations.

I have defined some Pipeline Parameters in Data Factory and want them to be configurable in my deployment pipeline. Seems like an obvious requirement to me.

Have I missed something fundamental? Help please!

The JSON is as follows:

{
    "Microsoft.DataFactory/factories/pipelines": {
        "*": {
            "properties": {
                "parameters": {
                        "*": "="                
                }
            }
        }
    },
    "Microsoft.DataFactory/factories/integrationRuntimes": {
        "*": "="
    },
    "Microsoft.DataFactory/factories/triggers": {},
    "Microsoft.DataFactory/factories/linkedServices": {},
    "Microsoft.DataFactory/factories/datasets": {}
}
解决方案

I've been struggling with this for a few days and did not found a lot of info, so here what I've found out. You have to put the arm-template-parameters-definition.json in the configured root folder of your collaboration branch:

So in my example, it has to look like this:

If you work in a separate branch, you can test your configuration by downloading the arm templates from the data factory. When you make a change in the parameters-definition you have to reload your browser screen (f5) to refresh the configuration.

If you really want to parameterize all of the parameters in all of the pipelines, the following should work:

"Microsoft.DataFactory/factories/pipelines": {
    "properties": {
        "parameters":{
            "*":{
                "defaultValue":"="
            }
        }
    }
}

I prefer specifying the parameters that I want to parameterize:

"Microsoft.DataFactory/factories/pipelines": {
    "properties": {
        "parameters":{
            "LogicApp_RemoveFileFromADLSURL":{
                "defaultValue":"=:-LogicApp_RemoveFileFromADLSURL:"
            },
            "LogicApp_RemoveBlob":{
                "defaultValue":"=:-LogicApp_RemoveBlob:"
            }
        }
    }
}

这篇关于发布后如何获取Azure数据工厂参数到ARM模板参数文件(ARMTemplateParametersForFactory.json)中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-23 14:55