简体   繁体   English

如何绕过 Azure 数据工厂 ARM 模板参数限制?

[英]How to get around Azure Data Factory ARM Template parameter limits?

I have created an Data Factory in Azure with a about 10-15 pipelines in it and they all work fine and I can debug and run them without issue on the Test Data Factory that I have setup.我在 Azure 中创建了一个数据工厂,其中有大约 10-15 个管道,它们都可以正常工作,我可以在我设置的测试数据工厂上调试和运行它们而不会出现问题。 I have also setup Azure DevOps integration with the Data Factory with a CI/CD pipeline.我还使用 CI/CD 管道设置了 Azure DevOps 与数据工厂的集成。

Initially this pipeline worked fine as well and I was able to use the generated ARM template to recreate the Pipelines/Triggers/etc on a production Data Factory instance.最初这个管道也运行良好,我能够使用生成的 ARM 模板在生产数据工厂实例上重新创建管道/触发器/等。

Now I have added a few more things to the Data Factory and when it generates the ARM template now it creates a template that with 293 parameters, which when it is run through the CI/CD pipeline fails because only 256 parameters are allowed with an ARM template.现在我已经向数据工厂添加了一些东西,当它生成 ARM 模板时,它现在创建一个带有 293 个参数的模板,当它通过 CI/CD 管道运行时失败,因为 ARM 只允许 256 个参数模板。

A lot of the items that it put in the parameter file I do not need to be parameterized, like filename and file paths.它放在参数文件中的很多项目我都不需要参数化,例如文件名和文件路径。 All I really want to have parameterized is the various connection information.我真正想要参数化的是各种连接信息。

I tried to create a second ARM Template parameter file and remove the parameters that I didn't want because I read some documentation about being able to do this to add some additional parameters, but this doesn't work because it doesn't remove the parameters out of the ARM Template itself.我尝试创建第二个 ARM 模板参数文件并删除我不想要的参数,因为我阅读了一些关于能够执行此操作以添加一些附加参数的文档,但这不起作用,因为它不会删除ARM 模板本身的参数。

So my question is, is there a way to handle this?所以我的问题是,有没有办法处理这个问题? The things that I can think of doing are creating multiple Data Factories and only having a couple of pipelines in each one.我能想到的事情是创建多个数据工厂,并且每个工厂只有几个管道。 I don't really like this idea because it would become very large and cumbersome over time.我不太喜欢这个想法,因为随着时间的推移它会变得非常庞大和笨重。 I could manually remove the templates out of the parameter file and also out of the template itself, but I really don't like this solution as it is manual and really error prone.我可以手动从参数文件和模板本身中删除模板,但我真的不喜欢这个解决方案,因为它是手动的并且非常容易出错。

What I would ideally like to be able to do is to define which items I want to be parameterized in the Pipeline, like I mentioned 90% of the things that it parameterized I don't need to be parameterized, but I can't find any way to do this (short of manually doing it).理想情况下,我希望能够做的是定义我想要在管道中参数化的项目,就像我提到它参数化的 90% 我不需要参数化的东西,但我找不到任何方式来做到这一点(手动做的短)。

2 ways: 2种方式:

  1. obvious - remove unwanted parameters明显 - 删除不需要的参数
  2. less obvious - use objects instead of strings.不太明显 - 使用对象而不是字符串。

let me explain, imagine you have 5 input parameters called param1,2,3,4,5.让我解释一下,假设您有 5 个名为 param1,2,3,4,5 的输入参数。 you can "compress" them into a single parameter like this:您可以将它们“压缩”为单个参数,如下所示:

"param": {
    "type": object,
    "defaultValue": {
        "param1": "something",
        xxx
        "param5": "otherthing"
    }
}

seeing you have 290 parameters, I'd probably go the object route, because that way you can logically group them.看到你有 290 个参数,我可能会选择对象路由,因为这样你就可以在逻辑上对它们进行分组。

as for not parameterizing thing - you can define variable of default values for them (but if you define default values they still count for parameters), so variables allow you to do that.至于不参数化的东西 - 你可以为它们定义默认值的变量(但如果你定义默认值,它们仍然算作参数),所以变量允许你这样做。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Azure 数据工厂 - ARM 模板 - Azure Data Factory - ARM Template Azure 数据工厂 ARM 模板 - Azure Data Factory ARM template 在 ARM 模板部署输出中获取 Azure 数据工厂的 ObjectId - Get ObjectId of Azure Data Factory, within ARM template deployment output 如何在发布后将 Azure 数据工厂参数获取到 ARM 模板参数文件 (ARMTemplateParametersForFactory.json) - How to get the Azure Data Factory parameters into the ARM template parameters file (ARMTemplateParametersForFactory.json) after publishing 如何自动导出 Azure 数据工厂的 ARM 模板? - How to automate the export of the ARM template for Azure Data Factory? 通过 ARM 模板部署的 Azure 数据工厂 - Azure Data Factory deployed via ARM Template 如何导入现有的数据工厂 ARM 模板? - How to import an existing data factory ARM template? Powershell为Azure数据工厂管道下载ARM模板 - Powershell to download ARM template for Azure data factory Pipeline 使用 Azure 数据工厂实用程序生成 ARM 模板不会为数据工厂资源生成位置标记 - Using Azure Data Factory utilities to generate ARM Template does not generate the location tag for the Data Factory resource 以数组为参数的 Azure ARM 模板 - Azure ARM template with array as parameter
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM