title: hive data load from double quote enclosed csv file format
body: <p>My query is not working according to this post <a href="https://stackoverflow.com/questions/30637536/how-to-load-csv-data-with-enclosed-by-double-quotes-and-separated-by-tab-into-hi">similar post</a></p>
  
  <p>Used the below command with the sql. But im not executing from shell. The sql is created as a string in python and passed to hive using paramiko. In shell it works fine. But when passed as as string from python im getting a bash error. It looks like some character escape issue. </p>
  
  <p>Im trying to load csv file with each column value enclosed in double quotes.</p>
  
  <pre><code>   strsql='''create table temp(col1 INT,col2 string) ROW FORMAT SERDE 'org.apache.hadoop.hive.serde2.OpenCSVSerde' WITH SERDEPROPERTIES ("quoteChar" = "\"") tblproperties ('skip.header.line.count'='1'); '''
  </code></pre>
  
  <p>Error </p>
  
  <pre><code>["bash: -c: line 4: unexpected EOF while looking for matching `''\n", 'bash: -c: line 5: syntax error: unexpe                                                                                   cted end of file\n']
  </code></pre>
  
  <p>The i changed to <code>("quoteChar" = "\\"")</code> to add extra slash. Then i get a sql error</p>
  
  <pre><code>:FAILED: ParseException line 4:38 cannot recognize input near 'quoteChar' '=' ')' i                                                                                   n table properties list
  </code></pre>
  
  <p><strong>On further inspection the hive command is called with some extract properties as below. Could that be an issue?</strong></p>
  
  <pre><code>hive -e set hive.cli.print.header=true;hive.support.quoted.identifiers=column;hvesql;
  </code></pre>