简体   繁体   English

无法使用 Azure Databricks 访问已安装的 Azure 数据湖存储

[英]Unable to access a mounted Azure Data Lake storage using Azure Databricks

I'm playing around with the Azure Databricks.我在玩 Azure Databricks。 Using the documents specified on the Microsoft Learn website, I managed to mount a BLOB storage (ADLS Gen2) to my Databricks.使用 Microsoft Learn 网站上指定的文档,我设法将 BLOB 存储 (ADLS Gen2) 安装到我的 Databricks。

However, when I try to list the contents of the mounted storage, I get the following error:但是,当我尝试列出已安装存储的内容时,出现以下错误:

ExecutionError: An error occurred while calling z:com.databricks.backend.daemon.dbutils.FSUtils.ls.
: GET https://xxxxxxxxxxxxx.dfs.core.windows.net/xxxxxxx?resource=filesystem&maxResults=5000&timeout=90&recursive=false
StatusCode=403
StatusDescription=This request is not authorized to perform this operation using this permission.
ErrorCode=AuthorizationPermissionMismatch

I've checked the permissions, and my ServicePrincipal has been assigned the role 'STORAGE BLOB DATA CONTRIBUTOR' which allows R/W access on my storage container.我检查了权限,并且我的 ServicePrincipal 被分配了角色“STORAGE BLOB DATA CONTRIBUTOR”,它允许对我的存储容器进行 R/W 访问。

Anyone has an idea which part I'm missing to get this working?任何人都知道我缺少哪个部分来使其正常工作? Help will be much appreciated.帮助将不胜感激。

Just found a solution to my own problem.刚刚找到了解决我自己问题的方法。

Root cause was the fact there were no permissions set on the Azure Storage container itself (although in the Azure Portal, everything looked OK).根本原因是没有在 Azure 存储容器本身上设置权限(尽管在 Azure 门户中,一切看起来都不错)。

What I did to resolve this: Download and install Azure Storage Explorer on your local machine我做了什么来解决这个问题:在本地计算机上下载并安装 Azure Storage Explorer

  1. Download and install Azure Storage Explorer on your local machine, using the following url: https://azure.microsoft.com/en-us/features/storage-explorer/在本地计算机上下载并安装 Azure 存储资源管理器,使用以下 url: https://azure.microsoft.com/en-us/features
  2. Open the Azure Portal, and launch the Azure Cloud Shell.打开 Azure 门户,启动 Azure 云 Shell。
  3. Use the following command to retrieve the Object ID of your Application ID (Service Principal).使用以下命令检索您的应用程序 ID(服务主体)的 Object ID。 Unfortunately, at the time of this writing, you cannot retrieve this from the portal directly.不幸的是,在撰写本文时,您无法直接从门户中检索它。 Command: az ad sp show --id Application ID命令: az ad sp show --id应用程序 ID
  4. Copy the displayed Object ID from the result set.从结果集中复制显示的 Object ID。
  5. Right click on your storage container within Azure Storage Explorer, choose 'Manage Access...'右键单击 Azure 存储资源管理器中的存储容器,选择“管理访问...”
  6. Paste your Object ID, and assign the appropriate rights.粘贴您的 Object ID,并分配适当的权限。
  7. Save and retry your code from the Databricks notebook.保存并重试 Databricks 笔记本中的代码。

That did the trick for me.这对我有用。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 无法使用 Azure Databricks 挂载 Azure Data Lake Storage Gen 2 - Unable to mount Azure Data Lake Storage Gen 2 with Azure Databricks 使用帐户密钥访问 Azure Data Lake Storage Gen2 - Access Azure Data Lake Storage Gen2 using the account key 访问来自 Azure Data Lake 敏感存储的数据块文件 - Acces file from Azure Data Lake sensitive storage by databricks .jpg 文件未从 blob 存储(Azure 数据湖)加载到数据块中 - .jpg file not loading in databricks from blob storage (Azure data lake) 如何使用 databricks 在 Azure 数据湖中将.rdata 文件转换为镶木地板? - How to convert .rdata file to parquet in Azure data lake using databricks? 无法使用Java在Azure Data Lake上进行身份验证 - Unable to authenticate on azure data lake using java Azure Databricks:无法连接到 Azure Data Lake Storage Gen2 - Azure Databricks: can't connect to Azure Data Lake Storage Gen2 Azure Databricks 通过服务主体访问 Azure Data Lake Storage Gen2 - Azure Databricks accessing Azure Data Lake Storage Gen2 via Service principal 使用链接访问 Azure Data Lake Container - Access to Azure Data Lake Container by using a link Azure Data Lake Gen 2 - 如何选择加入“Azure Data Lake Storage 上的多协议访问” - Azure Data Lake Gen 2 - How to opt in to “Multi-protocol access on Azure Data Lake Storage”
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM