Getting error ordersRDD to show records


#1

Hi team ,

I have data at hdfs location PFB

I have used below code to run in spark
val ordersRDD=sc.textFile(“user/ethabhi2795/data/retail_db/orders”).map(rec=>rec.split("|"))

ordersRDD.take(5).foreach(println)

I got error message below

Please help resolve this problem

image


#2

Hi, as per the error message the input path is not correct.
Try using data/retail_db/orders


#3

Thanks this worked ,

But I have data at above location in my user folder , I am wondering y I am not able to read the file