title: How to substitue variables in beeline HQL script
body: <p>I am trying to execute a beeline hql file with the following contents.</p>
  
  <pre><code>INSERT OVERWRITE DIRECTORY "${hadoop_temp_output_dir}${file_pattern}${business_date}"  select data from  database.${table}
  </code></pre>
  
  <p>I am executing the script using the following command:</p>
  
  <pre><code>beeline -u "jdbc:hive2://svr.us.XXXX.net:10000/;principal=hive/svr.us.XXXX.net@NAEAST.COM" --hivevar hadoop_temp_output_dir=/tenants/demo/hive/database/ --hivevar file_pattern=sales --hivevar business_date=20180709  -f beeline_test.hql 
  </code></pre>
  
  <p>I see the variables are not getting substituted while they are getting executed in the hive environment. What is the mistake I made here.
  Also, how to setup init.hql(for all configurations) and execute this hql file</p>
  
  <p>EDIT:I got the answer: I just used double quotes for the variables and corrected few typos</p>