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

时间:2020-08-27 02:41:07

标签: databricks azure-databricks aws-databricks

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

%sh ls /dbfs/FileStore/tables

但是,在运行时版本7中,此功能不再起作用。有什么方法可以在运行时版本7中直接访问/ dbfs / FileStore?我需要运行命令来解压缩/ dbfs / FileStore / tables中的实木复合地板zip文件。这曾经在6.6版中可用,但是databricks的新“升级”打破了这种简单的核心功能。

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

1 个答案:

答案 0 :(得分:1)

在运行%sh ls /dbfs/FileStore/tables时,您无法在databricks运行时版本7中使用shell命令访问/dbfs/FileStore,因为默认情况下,该文件夹名为'/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文件夹中。

enter image description here