Hello Team,
I want to save filtered data row by row using saveAsTextFile. Kindly help.
I tried with flatmap but it's flattening every column.
val rdd1=sc.textFile("/user/edureka_40114/AppleStore.csv")
val rdd3=apple.map(x=>x.split(",")).filter(x=>x(12).equals("\"Games\"")).map(x=>(x(0),x(1)))
rdd3.collect()
I want the output to be saved in hdfs file as below but using flatmap it's giving everything in a separate line.
"1","281656475"
"6","283619399"
"10","284736660"