Below is my code from Spark 1.6. I am trying to convert it to Spark 2.3 but I am getting error for using split.
Spark 1.6 code:
val file = spark.textFile(args(0))
val mapping = file.map(_.split('/t')).map(a => a(1))
mapping.saveAsTextFile(args(1))
Spark 2.3 code:
val file = spark.read.text(args(0))
val mapping = file.map(_.split('/t')).map(a => a(1)) //Getting Error Here
mapping.write.text(args(1))
Error Message:
value split is not a member of org.apache.spark.sql.Row