View the online Dataframe how to save the results to a file has been tried and have failed, wrote on the blog are using the most: first import import org.apache.saprk.sql.SaveMode packages in the spark-shell model, then result.repartitione (1) .save ( "... / out.json", "json", SaveMode.Overwrite) in such a way to hold the result, no matter how I try all error
I do not know what version of the problem or reason, save all the wrong version of the Spark-2.4.3 I am using, hive-2.3 .4, looking for a reason to solve this problem inform friends find it in this thanked.
Return to the topic since the problem lies in how to think not save it and then find other alternative to using the following approach
re here is that I've dealt with constant good results
re.write.mode(SaveMode.Overwrite).json("result.json")
Found no error really great
view files for each column I found the results as a file storage
Storing a file to be synthesized shall add repartition (1) or coalesce (1)
Stored locally
re.repartition(1).write.csv("file:/root/out")