top of page
  • Writer's pictureSean Forgatch

How to add Custom Parameters to Data Factory Templates


When generating Azure Data Factory(ADF) ARM templates, not all fields are automatically parameterized or you may not want a huge list of parameters in your template for manageability sake.





Problem :

When Git integration is setup and you submit a Publish, ADF will auto-create\update two ARM templates(1 deployment template called ARMTemplateForFactory.json, and 1 deployment parameters template called ARMTemplateParametersForFactory.json) to the adf_publish branch. Parameters are listed both at the top of the ..TemplateForFactory file and in the ParametersForFactory file.


ADF attempts to auto-create all the parameters but some fields do not get auto-generated, or you may simple just want more control over the parameters within your factory.

Solution :

Use ADF's arm-template-parameters-definition.json file.

  1. Create a custom file called arm-template-parameters-definition.json with your new custom parameters.

  2. Place the custom file in your master branch.

  3. Refresh your ADF portal, may want to completely open a new ADF window to be safe.

  4. Publish the Data Factory.


Requirements:

  • The file must be name arm-template-parameters-definition.json

  • The file must have correct JSON format.

  • You must hit refresh in the ADF portal before doing a publish in order for this to work (at the time of this writing).



Outcome: Your standard ARMTemplateParametersForFactory.json file will now include your normal parameters as well as your custom parameters, you will be able to reference your custom parameters from within your Override Parameters tab in your CICD task.


Learn about the syntax here and reach out if you have issues: https://docs.microsoft.com/en-us/azure/data-factory/continuous-integration-deployment#use-custom-parameters-with-the-resource-manager-template

 





6,254 views1 comment
bottom of page