title: Spark : Modify CSV file and write to other folder
body: <p>Folks,</p>
  
  <p>We have one requirement where we wanted to do a minor transformation on CSV file and write the same in to other HDFS folder using spark.</p>
  
  <p>e.g /input/csv1.txt (at least 4 GB file)</p>
  
  <pre><code>ID,Name,Address
  100,john,some street
  </code></pre>
  
  <p>output should be in file (output/csv1.txt). Basically two new columns will be added after analyzing address ( Order of record should be same as input file)</p>
  
  <pre><code>ID,Name,Address,Country,ZipCode
  100,Name,Address,India,560001
  </code></pre>
  
  <p>Looks like there is no easy to do this with spark.</p>