I'm using saveAsTextFile(path)
in order to save output as text file in later to import the result to DB. The output looks something like this:
(value1, value2)
How to remove the parentheses?
Before making saveAsTextFile
use map(x => x.mkString(",")
rdd.map(x => x.mkString(",").saveAsTextFile(path)
Output will not have bracket.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With