spark-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ashok Kumar <>
Subject Splitting columns from a text file
Date Mon, 05 Sep 2016 12:48:50 GMT
I have a text file as below that I read in
val textFile = sc.textFile("/tmp/mytextfile.txt")
Now I want to split the rows separated by ","
scala>>x.toString).split(",")<console>:27: error: value split
is not a member of org.apache.spark.rdd.RDD[String]>x.toString).split(",")
However, the above throws error?
Any ideas what is wrong or how I can do this if I can avoid converting it to String?

View raw message