Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Deploying Azure Data Factory using ARM Templates

I'm trying to deploy an Azure Data Factory service using Azure Resource Manager Templates. So far I was able to create the Data Factory itself but I couldn't add any Linked Service, Pipeline or Dataset to it using this approach. Since there is no example of the Data Factory template available, I created mine based on the REST API documentation. The following is the Template I was trying to implement, but a "Bad Request" is returned by the server.

{
   "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
   "contentVersion": "1.0.0.0",
   "parameters": {
     "siteName": {
       "type": "string"
     }
   },
   "resources": [
     {
        "apiVersion": "2015-05-01-preview",
        "type": "Microsoft.DataFactory/datafactories",
        "name": "teststoragedatafactory",
        "location": "[resourceGroup().location]",
        "resources": [
            {
                "apiVersion": "2015-05-01-preview",
                "type": "linkedservices",
                "name": "mylinkedservice",
                "location": "[resourceGroup().location]",
                "dependsOn": [
                       "/subscriptions/xxx/resourceGroups/TestARMTemplate/providers/Microsoft.DataFactory/datafactories/teststoragedatafactory"
                ],
                "properties":
                {
                    "type": "AzureStorageLinkedService",
                    "description": "",
                    "connectionString": "DefaultEndpointsProtocol=https;AccountName=xxx;AccountKey=xxx"
                }
            }
        ]
     }
   ]
}

According to the information I could get from the log, the request to the API is performed, and the endpoint seems to be correct. However there seems to be a problem with the request payload.

Have any of you some experience using ARM Templates to deploy Data Factory services? It is possible to create a linked service using this approach? Is there any way to see the Request used to create the linked service?

Thank you very much for your help!

Javi

like image 574
Javier Rebagliatti Avatar asked Nov 09 '22 09:11

Javier Rebagliatti


1 Answers

You can find an example of a template creating a data factory account and simple pipeline in the azure quickstart template gallery

like image 104
Nava Vaisman Levy Avatar answered Nov 29 '22 13:11

Nava Vaisman Levy