2017-07-05 25 views
2

我一直从数据工厂收到以下错误,每当我运行一个U型SQL工作U型SQL工作在数据未按厂

Job submission failed, the user 'adla account name' does not have permissions to a subfolder in the /system/ path needed by Data Lake Analytics. Please run “Add User Wizard” from the Data Lake Analytics Azure Portal or use Azure PowerShell to grant access for the user to the /system/ and its children on the Data Lake Store. 

而且我没有使用任何防火墙在这篇文章建议:

Run U-SQL Script from C# code with Azure Data Factory

我正在使用Azure Data Lake Store服务主体验证。当我从Visual Studio启动作业时,它也可以正常工作。

我会是什么想法感激......

感谢

+0

您是否明确将帐户权限授予了Azure数据湖店?请参阅http://spr.com/azure-data-lake-store-add-service-to-service-authentication/ –

+0

的步骤2是的,我做到了。 Active Directory应用程序可以访问adls根文件夹及其所有子项... – COR

回答

0

这听起来像一个权限问题。您可以运行这个PowerShell脚本,以确保您已经应用适当的权限安全主体:

Login-AzureRmAccount 
$appname = “adla” 
$dataLakeStoreName = “yourdatalakename” 

$app = Get-AzureRmADApplication -DisplayName $appname 

$servicePrincipal = Get-AzureRmADServicePrincipal -SearchString $appname 

Set-AzureRmDataLakeStoreItemAclEntry -AccountName $dataLakeStoreName -Path/-AceType User -Id $servicePrincipal.Id -Permissions All 

Set-AzureRmDataLakeStoreItemAclEntry -AccountName $dataLakeStoreName -Path /system -AceType User -Id $servicePrincipal.Id -Permissions All 

如果你想使用PowerShell脚本来创建一切从头开始,这里是一个博客,将帮助你:

http://dyor.com/setting-up-an-azure-data-lake-and-azure-data-factory-using-powershell/

+0

谢谢@mattyor ...安全主体拥有对ADLS +所有子项的根文件夹的权限。此外,它是默认权限的一部分... – COR

+1

我仔细检查了这一点。我没有为根文件夹及其所有子项分配权限。但是,系统和目录文件夹没有获得任何权限。我不得不手动重新分配这些文件夹的权限。剧本肯定有帮助。感谢 – COR

+1

非常好!我发现Azure Data Lake Store权限失败的方式太沉默。我花了几个小时的权限不好。如果门户网站表示“安全主管X正在尝试访问文件夹Y,但没有权限”,它将为我节省大量时间。但是,如果你只是使用powershell来创建SP(我在引用的博客中所做的),那也可以。谢谢。 – mattdyor

1

如果您授权来自Azure Data Factory的Azure Data Lake Analytics关联服务与可能成为问题的服务主体。

我对Microsoft有一个很好的支持服务,因为服务主体认证方法只适用于简单的数据工厂活动,比如'copy'。如果您想验证复杂的活动(如“DotNotActivity”),则不起作用

我的建议是将链接的服务改回使用会话和令牌认证,然后部署你的活动,然后再试一次。

希望这会有所帮助。

+1

谢谢@保罗安德鲁您的意见。我能够解决这个问题。实际上,Azure Active Directory应用帐户我在“系统”和“目录”文件夹上使用了真正的权限。这真的很奇怪... 但是,我会记住你的提示。非常感谢!和顺便说一句,你的博客摇滚! – COR