0

Why cannot I do somthing like this?

import spark.implicits._
dbutils.fs.ls(folderName).toDF

throws an error of

value toDF is not a member of Seq[com.databricks.backend.daemon.dbutils.FileInfo]

But it works fine in databricks notebook. Can anyone advice what I am missing?

I am using the following library "com.databricks" %% "dbutils-api" % "0.0.4"

Srinivas
  • 2,010
  • 7
  • 26
  • 51

1 Answers1

1

From the relevant Databricks page:

DBUtils are not supported outside of notebooks

Sparker0i
  • 1,787
  • 4
  • 35
  • 60