공부
[Java][Spark] dataframe to csv
승가비
2021. 9. 11. 09:07
728x90
yourDf
.coalesce(1) // if you want to save as single file
.write
.option("sep", "\t")
.option("encoding", "UTF-8")
.csv("outputpath")
How to write a spark dataframe tab delimited as a text file using java
I have a Spark Dataset with lot of columns that have to be written to a text file with a tab delimiter. With csv its easy to specify that option, but how to handle this for a text file when using J...
stackoverflow.com
728x90