Write single CSV file using spark-csv

前端 未结 13 2101
心在旅途
心在旅途 2020-11-22 08:43

I am using https://github.com/databricks/spark-csv , I am trying to write a single CSV, but not able to, it is making a folder.

Need a Scala function which will take

13条回答
  •  深忆病人
    2020-11-22 09:17

    you can use rdd.coalesce(1, true).saveAsTextFile(path)

    it will store data as singile file in path/part-00000

提交回复
热议问题