我想知道我的 databricks 代码是否寻址了正确的位置,以及“贡献者”权限是否足以访问存储。
- 我有 Azure Storage Gen 2,其中包含名为 staging 的容器。 (Azure 门户中的 URL 为 https://datalaketest123.blob.core.windows.net/staging )
- 我已使用 Azure Databricks 安装 Azure Storage Gen 2。
- 我已配置直通并假设我可以通过 AD 用户访问存储。 (贡献者权利)
- 我有变量:source = 'abfss://' + in_fileSystemName + '@' + storageAccountName + '.dfs.core.windows.net/'
- 我现在尝试使用命令列出文件系统:dbutils.fs.ls(source)
我收到错误:
ET https://datalaketest123.dfs.core.windows.net/staging?
resource=filesystem&maxResults=500&timeout=90&recursive=false
---------------------------------------------------------------------------
ExecutionError Traceback (most recent call last)
<command-1012822525241408> in <module>
27 # COMMAND ----------
28 source = 'abfss://' + in_fileSystemName + '@' + storageAccountName + '.dfs.core.windows.net/'
---> 29 dbutils.fs.ls(source)
30
31 # COMMAND ----------
/local_disk0/tmp/1235891082005-0/dbutils.py in f_with_exception_handling(*args, **kwargs)
312 exc.__context__ = None
313 exc.__cause__ = None
--> 314 raise exc
315 return f_with_exception_handling
316
ExecutionError: An error occurred while calling z:com.databricks.backend.daemon.dbutils.FSUtils.ls.
: GET https://datalaketest123.dfs.core.windows.net/staging?
resource=filesystem&maxResults=500&timeout=90&recursive=false
StatusCode=403
StatusDescription=This request is not authorized to perform this operation using this permission.
ErrorCode=AuthorizationPermissionMismatch
最佳答案
每official Databricks docs仅 Contributor
是不够的 - 它应该是 Storage Blob Data XXX
(其中 XXX 是 Owner
、Contributor
、阅读器
, .... - see docs )
关于databricks - 无法使用 Databricks 列出 Azure 存储 Gen 2 文件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/64934546/