title: hive command in bash script won't load file into table
body: <p>I am writing a bash script that - among other things - has to create a hive table and load a csv file (whose name is not known a priori) into that table.
  I have exported the name of the file <code>foo.csv</code> into the environment variable <code>myfile</code> and have tried the command</p>
  
  <pre><code>hive --hiveconf mf=$myfile -e 'set mf; set hiveconf:mf; load data local inpath ${hiveconf:mf} into table mytable'
  </code></pre>
  
  <p>It returns the error</p>
  
  <pre><code>FAILED: ParseException line 1:23 mismatched input 'foo' expecting StringLiteral near 'inpath' in load statement
  </code></pre>
  
  <p>I already tried using the absolute path to the file and it won't work either: if the path is <code>/mypath/foo.csv</code> the error will be </p>
  
  <pre><code>FAILED: ParseException line 1:23 mismatched input '/' expecting StringLiteral near 'inpath' in load statement
  </code></pre>
  
  <p>Even trying to directly put the file name like this </p>
  
  <pre><code>hive -e 'load data local inpath foo.csv into table mytable'
  </code></pre>
  
  <p>doesn't work at all, and the thrown error is the same as before.</p>
  
  <p>Does anybody have any idea on what is wrong with these commands? I could <em>really</em> appreciate some help, thanks.</p>