无法访问ADLS帐户'(帐户名)'

问题描述 投票:1回答:3

我试图使用azure数据工厂v2将数据复制到Azure数据湖商店接收器。我创建了数据湖商店,在article here之后创建了一个AD Web应用程序,并确保该帐户可以访问数据湖商店。但是,每当我尝试运行涉及使用数据湖存储作为接收器的单个副本活动的管道时,我会收到以下错误:

活动副本(复制活动名称)失败:无法检测链接服务“AzureDataLakeStore”的区域:“LS_DataLakeStore”,错误“无法访问ADLS帐户”(数据湖商店帐户名称)'。请确保它已被创建。',请明确指定connectVia属性引用的集成运行时的位置,以避免在需要时进行区域检测。

我已经三次检查帐户名称是否正确。我已授予AD应用程序“所有者”对订阅的访问权限,以确保它不是权限问题。我甚至尝试创建一个Adf集成运行时,所以我可以通过错误建议的'connectVia'属性来指定它,一切都没有运气。

关于为什么ADF似乎无法看到我的数据湖商店的想法?

这是我的Linked Service 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}"
    }
  }
}
azure-data-factory
3个回答
1
投票
  1. 确保您在linkeservice typeProperties中提供的subscriptionId,resourceGroupName确实是数据湖帐户所属的。
  2. 确保您在数据湖帐户上为用户/ Serviceprincipal授予至少“读者”角色,以下是如何制作: 一个。转到Azure门户,找到Data Lake Store帐户 湾单击Data Lake Store刀片上的“访问控制(IAM)” C。单击“访问控制(IAM)”刀片中的“添加” d。将“Role”设置为“Reader”,并指定您创建的AAD应用程序
  3. 如果仍然无效,请尝试指定执行位置。 对于ADFV1,executionLocation是复制活动“typeProperties”的属性; “活动”: {“name”:“SqlServertoAzureSearchIndex”,“description”:“copy activity”,“type”:“Copy”,...“typeProperties”:{“source”:{“type”:“SqlSource”},“sink “:{”type“:”AzureSearchIndexSink“},”executionLocation“:”West US“,},...}]

对于ADFV2,在AzureDataLakeStoreLinkedService上指定connectVia以链接到CloudIR,如下所示:

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

0
投票

感谢您使用Azure数据工厂,Andrew。

根据您附加的链接服务有效负载,我认为您正在为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)中的“Reader”角色。细节步骤:

  1. 转到Azure门户,找到Data Lake Store帐户
  2. 单击Data Lake Store刀片上的“访问控制(IAM)”
  3. 单击“访问控制(IAM)”刀片中的“添加”
  4. 将“Role”设置为“Reader”,并指定您创建的AAD应用程序

之后,请尝试重新运行复制活动。


0
投票

您可能需要告诉ADF在V2中使用特定的Integration Runtime,而不是依赖于使用Default IR进行自动区域检测。

首先,在Azure Data Lake Store所在的区域中创建一个新的Integration Runtime:

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

然后使用对新IR的引用将connectVia属性添加到Azure Data Lake Store链接服务:

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

© www.soinside.com 2019 - 2024. All rights reserved.