title: Import Data Into Hive Containing Whitespace
body: <p>I am importing data from a csv file into Hive. My table contains both strings and ints. However, in my input file, the ints have whitespace around them, so it kind of looks like this:</p>
  
  <pre><code>some string,     2    ,another string  ,    7    , yet another string
  </code></pre>
  
  <p>Unfortunately I cannot control the formatting of the program providing the file. </p>
  
  <p>When I import the data using (e.g.):</p>
  
  <pre><code>CREATE TABLE MYTABLE(string1 STRING, alpha INT, string2 STRING, beta INT, string3 STRING) 
  ROW FORMAT DELIMITED FIELDS TERMINATED BY ','
  </code></pre>
  
  <p>Then all my integers get set to NULL. I am assuming this is because the extra whitespace makes the parsing fail. Is there a way around this?</p>