Preserving order while saving DF to a file

Can someone tell me how to preserve order while saving RDD/DF to files. I am aware of coalesce but suppose I am writing output to 200 files with a predefined order but if i read data from those saved files then order is not preserved, data is opening in random order


Learn Spark 1.6.x or Spark 2.x on our state of the art big data labs

  • Click here for access to state of the art 13 node Hadoop and Spark Cluster