Access DBUtils from Scala app running under databricks-connect

After a lot of trial and error this is what worked for me.

SBT manifest:

name := "test-dbutils"

version := "0.1.0-SNAPSHOT"

scalaVersion := "2.12.15"
val sparkVersion = "3.1.3"

libraryDependencies += "org.apache.spark" %% "spark-sql" % sparkVersion

libraryDependencies += "com.databricks" %% "dbutils-api" % "0.0.5"

(note the com.databricks... dependency!)

Then in Scala code this works:

val dbutils = com.databricks.service.DBUtils
val files ="/FileStore")


Em, excuse me! Have Android 📱 and use Databricks? You might be interested in my totally free (and ad-free) Pocket Bricks . You can get it from Google Play too: Get it on Google Play

Thanks! You can always email me or use contact form for more questions/comments etc.