gpt4 book ai didi

Azure databricks DBFS 挂载不可见

转载 作者:行者123 更新时间:2023-12-05 07:19:17 24 4
gpt4 key购买 nike

我正在尝试使用以下代码使用 python 笔记本将 azure 存储 blob 安装到 azure Databricks 中。

mount_name = '/mnt/testMount'

if not any(mount.mountPoint == mount_name for mount in dbutils.fs.mounts()):
dbutils.fs.mount(
source = "wasbs://%s@%s.blob.core.windows.net" % (container, accountName),
mount_point = mount_name,
extra_configs = {"fs.azure.account.key.%s.blob.core.windows.net" % (accountName ) : accountKey })

挂载成功,我能够使用print(dbutils.fs.mounts())看到还在我的 Linux VM 中使用 DBFS CLI。 dbfs ls dbfs:/mnt/testMount

但是在 UI 中可见,也无法从 python 笔记本访问 FileNotFoundError: [Errno 2] 没有这样的文件或目录:'/mnt/testMount/'

有人可以告诉我您是否遇到此问题以及解决方法吗?

enter image description here

谢谢

最佳答案

我真的建议您阅读Managed and unmanaged tables部分官方文档User Guide > Databases and Tables .

enter image description here

因此,您将 Azure Blob 存储挂载到 DBFS,作为 Azure Databricks 文件系统的一部分,该文件系统属于通过笔记本中编码创建的非托管表。

enter image description here

关于Azure databricks DBFS 挂载不可见,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57849430/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com