title: Sqoop: How to add an extra column to output and replace empty strings?
body: <p>I have an SQL table with the following columns:</p>
  
  <pre><code>name, fname, e-mail, phone
  </code></pre>
  
  <p>How to import this table with Sqoop into CSV file on HDFS with:</p>
  
  <ol>
  <li><p>An extra <code>phone2</code> column so to have the following format of output CSV record:</p>
  
  <p>name, fname, e-mail, phone, phone2</p></li>
  </ol>
  
  <p>where <code>phone2</code> has <code>udef</code> value for <strong>all</strong> output records.</p>
  
  <ol>
  <li><p>Some input records may have an empty <code>e-mail</code> field which results in CSV lines with <code>,,</code> fields like this:</p>
  
  <p>John,Smith,,1234567</p></li>
  </ol>
  
  <p>How to replace <code>,,</code> empty strings with <code>undef</code> string? To have CSV with records like:</p>
  
  <p>John ,Smith ,undef ,1234567, undef
     Tom, Brooks, toom@abc.com, 78979878, undef
     ...
     etc</p>