2017-07-05 27 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