scala - How to remove parentheses around records when saveAsTextFile on RDD[(String, Int)]? -
i'm using saveastextfile(path) in order save output text file in later import result db. output looks this:
(value1, value2) how remove parentheses?
you can try following basic:
rdd.map(x => x._1 + "," + x._2).saveastextfile(path) you map rdd[(a,b)] rdd[string] , save it.
Comments
Post a Comment