title: Apache Spark working with pipe delimited CSV files
body: <p>I am very new to Apache Spark and am trying to use SchemaRDD with my pipe delimited text file.  I have a standalone installation of Spark 1.5.2 on my Mac using Scala 10. I have a CSV file with the following representative data and I am trying to split the following into 4 different files based on the first value (column) of the record.  I would very much appreciate any help I can get with this.</p>
  
  <pre><code>1|1.8|20140801T081137|115810740
  2|20140714T060000|335|22159892|3657|0.00|||181
  2|20140714T061500|335|22159892|3657|0.00|||157
  2|20140714T063000|335|22159892|3657|0.00|||156
  2|20140714T064500|335|22159892|3657|0.00|||66
  2|20140714T070000|335|22159892|3657|0.01|||633
  2|20140714T071500|335|22159892|3657|0.01|||1087
  3|34|Starz
  3|35|VH1
  3|36|CSPAN: Cable Satellite Public Affairs Network
  3|37|Encore
  3|278|CMT: Country Music Television
  3|281|Telehit
  4|625363|1852400|Matlock|9212|The Divorce
  4|625719|1852400|Matlock|16|The Rat Pack
  4|625849|1846952|Smallville|43|Calling
  </code></pre>