无法在 databricks 运行时版本 7 中使用 shell 命令访问 /dbfs/FileStore

2023-12-01

在 databricks 运行时版本 6.6 中,我能够成功运行如下 shell 命令:

%sh ls /dbfs/FileStore/tables

但是,在运行时版本 7 中,这不再起作用。有没有办法在运行时版本7中直接访问/dbfs/FileStore?我需要运行命令来解压缩 /dbfs/FileStore/tables 中的 parquet zip 文件。这曾经在 6.6 版本中工作,但 databricks 新的“升级”打破了这个简单的核心功能。

不确定这是否重要,但我正在使用社区版的 databricks。


当您运行 %sh ls 时/dbfs/FileStore/tables你无法访问/dbfs/FileStore在 databricks 运行时版本 7 中使用 shell 命令,因为默认情况下,名为'/dbfs/FileStore' does not exists in the 'dbfs'.

enter image description here

尝试在 ' 中上传一些文件/dbfs/FileStore/Tables'.

enter image description here

现在,尝试再次运行相同的命令%sh ls /dbfs/FileStore/tables,现在您可以看到结果,因为我们已将数据上传到/dbfs/FileStore/tables folder.

enter image description here

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

无法在 databricks 运行时版本 7 中使用 shell 命令访问 /dbfs/FileStore 的相关文章

随机推荐