title: Hive syntax: purpose of curly braces and dollar sign
body: <p>I'm reading over some Hive scripts from another team in my company and having trouble understanding a specific part of it. The part in question is:<code>where dt='${product_dt}'</code>, which can be found on on the third line from the bottom of the code chunk below.</p>
  
  <p>I've never seen this syntax before nor am I able to find anything via Google search (probably because I don't know the correct search terms to use). Any insight into what that <code>where</code> row filter step is doing would be appreciated.</p>
  
  <pre><code>set hive.security.authorization.enabled=false;
  add jar /opt/mobiletl/prod_workflow_dir/lib/hiveudf_hash.jar;
  create temporary function hash_string as 'HashString';
  
  drop table 00_truthset_product_email_uid_pid;
  create table 00_truthset_product_email_uid_pid as
  select distinct email,        
         concat_ws('|', hash_string(lower(email), "SHA-1"),
                        hash_string(lower(email), "MD5"),
                        hash_string(upper(email), "SHA-1"),
                        hash_string(upper(email), "MD5")) as hashed_email,
         uid, address_id, confidencescore
  from product.prod_vintages
  where dt='${product_dt}'
        and email is not null and email != ''
        and address_id is not null and address_id != '';
  </code></pre>
  
  <p>I tried <code>set product_dt = 2014-12;</code>, but it doesn't seem to work:</p>
  
  <pre><code>hive&gt; SELECT dt FROM enabilink.prod_vintages GROUP BY dt LIMIT 10;
  . . .
  dt
  2014-12
  2015-01
  2015-02
  2015-03
  2015-05
  2015-07
  2015-10
  2016-01
  2016-02
  2016-03
  
  hive&gt; set product_dt = 2014-12;
  
  hive&gt; SELECT email FROM product.prod_vintages WHERE dt='${product_dt}';
  . . .
  Total MapReduce CPU Time Spent: 2 seconds 570 msec
  OK
  email
  Time taken: 25.801 seconds
  </code></pre>