title: Inserting into Hive Table error
body: <p>I am looking to encode columns of a table in hive.</p>
  
  <p>I tried:</p>
  
  <pre><code>hive&gt; create table encode_test(id int, name STRING, phone STRING, address STRING) 
  &gt; ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe' 
  &gt; WITH SERDEPROPERTIES ('column.encode.columns'='phone,address', 'column.encode.classname'='org.apache.hadoop.hive.serde2.Base64WriteOnly') STORED AS TEXTFILE;
  </code></pre>
  
  <p>Say i have a CSV file, with following row</p>
  
  <pre><code>100,'navis','010-0000-0000','Seoul Seocho'
  </code></pre>
  
  <p>Now i tried to use.</p>
  
  <pre><code>LOAD DATA LOCAL INPATH
  '/home/path/to/csv/test.csv'
  INTO TABLE encode_test;
  </code></pre>
  
  <p>But when doing <code>Select * from encode_test i am getting all columns NULL</code></p>
  
  <p>Whereas the result should have been </p>
  
  <p><code>100    navis     MDEwLTAwMDAtMDAwMA==  U2VvdWwsIFNlb2Nobw==</code></p>
  
  <p>Also i want to give  <code>Fields TERMINATED BY ','</code> IN create table encode_test query.</p>
  
  <p>but i am getting <code>error:  EOF error Near Fields</code></p>
  
  <p>I also tried creating another table <code>sample</code></p>
  
  <p><code>create table sample(id int, name STRING, phone STRING, address STRING)
  ROW FORMAT DELIMITED
  FIELDS TERMINATED BY ','
  LINES TERMINATED BY '\n'
  STORED AS TEXTFILE;
  </code>
  And then imported the csv file in the <code>sample</code> table. and it was successfully imported.</p>
  
  <p>then i tried using.</p>
  
  <p><code>insert into encode_test select * from sample;</code></p>
  
  <p>But i am getting this new error 
  <code>Permission denied: user=root, access=WRITE, inode="/user":h                                                                                        dfs:supergroup:drwxr-xr-x
          at org.apache.hadoop.hdfs.server.namenode.DefaultAuthorizationProvider.c                                                                                        heckFsPermission(DefaultAuthorizationProvider.java:279)</code></p>
  
  <p>I'n new into hadoop </p>
  
  <p>Please refer to <a href="https://issues.apache.org/jira/browse/HIVE-6329" rel="nofollow noreferrer">this link</a> from where i tried this problem </p>