i am trying to read a log file using Spark CORE(RDD) and i do not have spark-csv APis to procees it smoothly. so i have to read it as textfile and later tweak it to form a DF. i am done till here ... but now all the data is coming in single column and ideally it should create 30+ columns..
Sample Data:(i have mentioned only few here but it is more than 30 columns)
ROUTE_NAME,THREADID,REQUESTID,TRANSTATUS,FailureReason,ServiceStartTime,ServiceEndTime
TCPIP,5,F20011,null,FATAL-23,24Jul2017 20:00:11.918,24Jul2017 20:00:20.090
what i have tried so far
val Fcore = sc.textFile("/home/data/instrumentationLog.log");
val FcoreZip=Fcore.zipWithIndex();// added index to removed header from data.
val FcoreData = FcoreZip.filter(s=> (s._1>0))//header removed
val FcoreDF= FcoreData.toDF(); // formed a DF
till here the complete data is in DF but comes in single column.. kindly guide me how to split into multiple columns to process further.