title: Load data in CSV format in Hive Table
body: <p>I am trying to store the following data in a csv file into Hive table but not able to do it successfully</p>
  
  <pre><code>Ann, 78%,7,  
  Beth,81%,5,  
  Cathy,83%,2,  
  </code></pre>
  
  <p>The data is present in CSV file. I created the table in Hive using below definition:</p>
  
  <pre><code>Hive&gt; CREATE TABLE test1 (Name String, Perc String, Rank String)  
  ROW FORMAT SERDE 'org.apache.hadoop.hive.contrib.serde2.RegexSerDe'  
  WITH SERDEPROPERTIES ("input.regex" = "^(\w+)\,(\w+)\%\,(\w+)$",  
  "output.format.string" = "%1$s %2$s %3$s" )
  STORED AS TEXTFILE;"      
  ok
  hive&gt; load data local inpath '/tmp/input.csv' into table test1;  
  ok  
  hive&gt; Select * from test1;  
  ok  
  
  Name    Perc    Rank  
  Null    Null    Null  
  Null    Null    Null  
  Null    Null    Null  
  </code></pre>
  
  <p>I am not able to figure out the mistake.  The resulting data is not getting loaded into the table.  </p>