The Inquisitive Coder
The Inquisitive Coder

Reputation: 1315

Importing ARM template for creating ADF resources not creating any

I am new to ADF & ARM. I have a blank Data Factory-v2(TestDataFactory-123Test) which I want to get it populated using an existing ADF(TestDataFactory-123). I followed step by step what is mentioned in the official documentation Create a Resource Manager template for each environment. The deployment shows succeeded but I can't see anything in it. I used 'Build your own template in the editor' option in the portal for importing the existing ARM template. Am I missing anything?

Below is the ARM which I got by 'exporting' the ARM for TestDataFactory-123:

{
  "$schema": "http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#",
  "contentVersion": "1.0.0.0",
  "parameters": {
    "factoryName": {
      "type": "string",
      "metadata": "Data Factory name",
      "defaultValue": "TestDataFactory-123"
    },
    "AzureBlobStorageLinkedService_connectionString": {
      "type": "secureString",
      "metadata": "Secure string for 'connectionString' of 'AzureBlobStorageLinkedService'",
      "defaultValue": "TestDataFactory-123"
    }
  },
  "variables": {
    "factoryId": "[concat('Microsoft.DataFactory/factories/', parameters('factoryName'))]"
  },
  "resources": [
    {
      "name": "[concat(parameters('factoryName'), '/AzureBlobStorageLinkedService')]",
      "type": "Microsoft.DataFactory/factories/linkedServices",
      "apiVersion": "2018-06-01",
      "properties": {
        "annotations": [],
        "type": "AzureBlobStorage",
        "typeProperties": {
          "connectionString": "[parameters('AzureBlobStorageLinkedService_connectionString')]"
        }
      },
      "dependsOn": []
    },
    {
      "name": "[concat(parameters('factoryName'), '/InputDataset')]",
      "type": "Microsoft.DataFactory/factories/datasets",
      "apiVersion": "2018-06-01",
      "properties": {
        "linkedServiceName": {
          "referenceName": "AzureBlobStorageLinkedService",
          "type": "LinkedServiceReference"
        },
        "annotations": [],
        "type": "Binary",
        "typeProperties": {
          "location": {
            "type": "AzureBlobStorageLocation",
            "fileName": "emp.txt",
            "folderPath": "input",
            "container": "adftutorial"
          }
        }
      },
      "dependsOn": [
        "[concat(variables('factoryId'), '/linkedServices/AzureBlobStorageLinkedService')]"
      ]
    },
    {
      "name": "[concat(parameters('factoryName'), '/OutputDataset')]",
      "type": "Microsoft.DataFactory/factories/datasets",
      "apiVersion": "2018-06-01",
      "properties": {
        "linkedServiceName": {
          "referenceName": "AzureBlobStorageLinkedService",
          "type": "LinkedServiceReference"
        },
        "annotations": [],
        "type": "Binary",
        "typeProperties": {
          "location": {
            "type": "AzureBlobStorageLocation",
            "folderPath": "output",
            "container": "adftutorial"
          }
        }
      },
      "dependsOn": [
        "[concat(variables('factoryId'), '/linkedServices/AzureBlobStorageLinkedService')]"
      ]
    },
    {
      "name": "[concat(parameters('factoryName'), '/CopyPipeline')]",
      "type": "Microsoft.DataFactory/factories/pipelines",
      "apiVersion": "2018-06-01",
      "properties": {
        "activities": [
          {
            "name": "CopyFromBlobToBlob",
            "type": "Copy",
            "dependsOn": [],
            "policy": {
              "timeout": "7.00:00:00",
              "retry": 0,
              "retryIntervalInSeconds": 30,
              "secureOutput": false,
              "secureInput": false
            },
            "userProperties": [],
            "typeProperties": {
              "source": {
                "type": "BinarySource",
                "storeSettings": {
                  "type": "AzureBlobStorageReadSettings",
                  "recursive": true
                }
              },
              "sink": {
                "type": "BinarySink",
                "storeSettings": {
                  "type": "AzureBlobStorageWriteSettings"
                }
              },
              "enableStaging": false
            },
            "inputs": [
              {
                "referenceName": "InputDataset",
                "type": "DatasetReference",
                "parameters": {}
              }
            ],
            "outputs": [
              {
                "referenceName": "OutputDataset",
                "type": "DatasetReference",
                "parameters": {}
              }
            ]
          }
        ],
        "annotations": []
      },
      "dependsOn": [
        "[concat(variables('factoryId'), '/datasets/InputDataset')]",
        "[concat(variables('factoryId'), '/datasets/OutputDataset')]"
      ]
    }
  ]
}

Upvotes: 0

Views: 1015

Answers (1)

The Inquisitive Coder
The Inquisitive Coder

Reputation: 1315

The fix was as simple as replacing the 'defaultValue' for the 'factoryName' parameter with the name of the empty data factory viz. 'TestDataFactory-123Test' and not the existing one 'TestDataFactory-123'! Also, I replaced the 'defaultValue' of the 'AzureBlobStorageLinkedService_connectionString' parameter with the actual connection string.

Upvotes: 0

Related Questions