I'm trying to split the below RDD row into five columns
val test = [hello,one,,,]
val rddTest = test.rdd
val Content = rddTest.map(_.toString().replace("[", "").replace("]", ""))
.map(_.split(","))
.map(e ⇒ Row(e(0), e(1), e(2), e(3), e(4), e(5)))
when I execute I get "java.lang.ArrayIndexOutOfBoundsException" as there are no values between the last three commas.
any ideas on how to split the data now?