title: Using Apache NiFi to write CSV files by contents of column
body: <p>I have an Apache NiFi flow, where I read in a massive <code>.csv</code> file. Here's a sample <code>.csv</code>:</p>
  
  <pre><code>school, date, city
  Vanderbilt, xxxx, xxxx
  Georgetown, xxxx, xxxx
  Duke, xxxx, xxxx
  Vanderbilt, xxxx, xxxx
  </code></pre>
  
  <p>I want to use NiFi to read the file, and then output another <code>.csv</code> file by <code>school</code> name. I.e. there would be a <code>.csv</code> file of two <code>Vanderbilt</code> records (two lines total, b/c two records), and one file for <code>Georgetown</code>, and one file for <code>Duke</code>.</p>
  
  <p>I've used <code>GetFile</code> to draw in my file (works, verified), and then <code>SplitText</code> (line split count = 1 &amp; header line count = 1), and then <code>ExtractText</code>, but I have a very wrong config in that one. Lastly, I have <code>PutFile</code>, which writes to where I need it to go. Thanks.</p>