LoginSignup
2
1

More than 3 years have passed since last update.

Azure Databricksでdbutils.fs.ls.help()の実行エラー時の対応方法【備忘録】

Posted at

概要

Azure Databricksにて、dbutils.fs.lsのヘルプを表示する方法を記載します。

エラー時のコード

%python
dbutils.fs.ls.help()

エラーメッセージ

AttributeError: 'function' object has no attribute 'help'
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
<command-3260864872878574> in <module>()
      1 
----> 2 dbutils.fs.ls.help()
AttributeError: 'function' object has no attribute 'help'

正常時のコード

%python
dbutils.fs.help("ls")

正常メッセージ

/**
* Lists the contents of a directory.
* 
* Example: display(ls("/mnt/my-folder/"))
* 
* The FileInfo object that is returned has the following helper methods:
* val files = ls("/mnt/my-folder/")
* files.map(_.name) // [myFile, myDir/]
* files.map(_.length) // [1286, 0]
* files.map(_.path) // [/mnt/my-folder/myFile, /mnt/my-folder/myDir/]
* files.map(_.isDir) // [false, true]
* files.map(_.isFile) // [true, false]
* 
* @param dir FileSystem URI
* @return Ordered sequence of FileInfos containing the name and size of each file.
*/
ls(dir: java.lang.String): scala.collection.Seq

参考リンク

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1