2017-10-17 267 views
1

我正在嘗試使用azure數據工廠v2將數據複製到Azure數據存儲池。我創建了數據湖商店,並在article here之後創建了一個AD網絡應用程序,並確保該帳戶可以訪問數據湖商店。不過,我收到以下錯誤,每當我試圖運行一個管道,涉及使用數據湖店作爲一個水槽的單一副本活動:無法訪問ADLS帳戶'(accountname)'

活動複製(副本活動名稱)失敗:無法檢測區的鏈接服務'AzureDataLakeStore':'LS_DataLakeStore',錯誤爲'無法訪問ADLS帳戶'(數據湖店帳號名稱)'。請確保它已被創建。',請明確指定由connectVia屬性引用的集成運行時的位置,以避免在需要時檢測區域。

我有三重檢查帳戶名是否正確。我已授予AD應用程序「所有者」對訂閱的訪問權限,以確保它不是權限問題。我甚至試圖創建一個Adf集成運行時,這樣我就可以通過錯誤提示的'connectVia'屬性來指定它,所有這些都沒有運氣。

想法爲什麼ADF似乎無法看到我的數據湖店?

這裏是我的鏈接業務的JSON:

{ 
    "name": "LS_DataLakeStore", 
    "properties": { 
    "type": "AzureDataLakeStore", 
    "typeProperties": { 
     "dataLakeStoreUri": "adl://{my adls account name}.azuredatalakestore.net/", 
     "servicePrincipalId": "{the application id of the AD account I created}", 
     "servicePrincipalKey": { 
     "type": "SecureString", 
     "value": "{the value of the key for the AD account I generated}" 
     }, 
     "tenant": "{my tenant id (I also tried using the tenant domain name here as well)}", 
     "subscriptionId": "{the subscription id in which the ADF and ADLS are located}", 
     "resourceGroupName": "{the resource group name in which the ADF and ADLS are located}" 
    } 
    } 
} 

回答

0

感謝您使用Azure的數據工廠,安德魯。

根據您附加的鏈接服務有效負載,我認爲您使用的是「Azure Data Lake Store」的「服務主體身份驗證」,後面是https://docs.microsoft.com/en-us/azure/data-factory/connector-azure-data-lake-store#using-service-principal-authentication的指導,對吧?

通常,錯誤應該由提供的服務主體沒有檢測Azure Data Lake Store的區域的權限引起。請至少授予Azure Data Lake Store上帳戶訪問控制(IAM)中的「讀者」角色。詳細步驟:

  1. 轉到Azure的門戶網站,發現該數據湖Store帳戶
  2. 點擊「訪問控制(IAM)」上的刀片數據湖店
  3. 點擊「添加」,在刀片「訪問控制(IAM)」
  4. 集「角色」,以「讀者」,並指定您創建

在此之後,AAD的應用程序,請嘗試重新運行復制活動。

0
  1. 請確保您在linkeservice typeProperties中提供的subscriptionId,resourceGroupName確實是數據湖帳戶所屬的。

  2. 請確保您有授予至少「讀者」的角色給用戶/ Serviceprincipal上的數據湖帳戶,這裏是如何使它:

    一個。轉到Azure Portal,找到Data Lake Store帳戶

    b。單擊Data Lake Store刀片上的「訪問控制(IAM)」

    c。單擊「訪問控制(IAM)」的刀片中的「添加」

    d。將「角色」設置爲「閱讀器」,並指定您創建的AAD應用程序

  3. 如果仍然無效,請嘗試指定執行位置。

    對於ADFV1,executionLocation是複製活動「typeProperties」的屬性;

    「活動」:
    { 「名」: 「SqlServertoAzureSearchIndex」, 「說明」: 「複製活動」, 「類型」: 「複製」, ... 「typeProperties」:{ 「源」:{ 「類型」:「SqlSource」 }, 「下沉」:{ 「類型」: 「AzureSearchIndexSink」 }, 「executionLocation」: 「西美」, }, .. 。 } ]

對於ADFV2,您AzureDataLakeStoreLinkedService指定connectVia鏈接到CloudIR這樣的:

"integrationRuntimes": [ 
     { 
      "name": "cloudIR", 
      "properties": { 
       "type": "Managed", 
       "typeProperties": { 
        "computeProperties": { 
         "location": "East US 2" 
        } 
       } 
      } 
     } 
    ] 
0

您可能需要告訴ADF使用在V2特定的集成運行,而不是依靠使用默認IR進行自動區域檢測。

首先,在您的Azure的數據湖店所在的地區創建一個新的集成運行環境:

https://docs.microsoft.com/en-us/azure/data-factory/create-azure-integration-runtime#create-azure-ir

然後使用參考connectVia屬性添加到您的Azure的數據湖將鏈接服務於新IR:

https://docs.microsoft.com/en-us/azure/data-factory/concepts-datasets-linked-services#linked-service-json