title: beeline query in bash script
body: <p>simple working beeline query below;  when i put in script it will run but I want to put a hivevar for the path, how do I accomplish this as when i put in my script <code>.properties</code> file the ='path' does not seem to work.  I am missing something with these single quotes i think and I just can't seem to get it to work.  </p>
  
  <p><code>maxValQuery.hql</code><br></p>
  
  <pre><code>WORKING: INSERT OVERWRITE DIRECTORY '/user/tmp/maxVal' select max(${hivevar:MAX_VAL_COL}) from ${hivevar:FACT_TABLE};
  WANTED:  INSERT OVERWRITE DIRECTORY ${hivevar:PATH_ON_HDFS} select max(${hivevar:MAX_VAL_COL}) from ${hivevar:FACT_TABLE};
  </code></pre>
  
  <p><code>script.sh</code></p>
  
  <pre><code> #! /bin/bash
   # I want to add --hivevar PATH_ON_HDFS=${maxValPathOnHDFS} 
      beeline \
          -u $hiveServer2 \
          --hivevar DATABASE_NAME_ON_HIVE=${dbNameOnHive} \
          --hivevar FACT_TABLE=${mainFactTableOnHive} \
          --hivevar MAX_VAL_COL=${factTableIncrementalColumn} \
          -f ${maxValQueryFile}
  </code></pre>
  
  <p><code>script.properties</code></p>
  
  <pre><code>dbNameOnHive=poc
  mainFactTableOnHive=factTable
  factTableIncrementalColumn=aTimeColumn
  maxValQueryFile=maxValQuery.hql
  #maxValPathOnHDFS='/user/tmp/maxVal'
  #I believe problem is above with the single quotes, yes I uncomment when i execute :P
  </code></pre>