1

I'm running a local spark session on my mac via my intellij sbt console and I get a org.apache.spark.sql.AnalysisException: Path does not exist: file:/Users/myuser/Documents/data/dataset.csv; error.

my current code looks like this:
val data = spark.read.csv("file:///Users/myuser/Documents/data/dataset.csv")

I've also tried:

val data = spark.read.csv("/Users/myuser/Documents/data/dataset.csv")

my spark session looks like this

import org.apache.spark.sql.SparkSession

trait SparkSessionWrapper {

  lazy val spark: SparkSession = {
    SparkSession
      .builder()
      .master("local")
      .appName("avro_test")
      .getOrCreate()
  }

} 

I know this is the same issue as the one found here: How to load local file in sc.textFile, instead of HDFS

but none of the answers here (and others i've looked at) are helping me or else i'm not fully understanding them. any suggestions?

J.Hammond
  • 251
  • 3
  • 17

0 Answers0