title: Can I use variable substitution in hive for a list of values?
body: <p>While the <a href="http://hive.apache.org/docs/r0.9.0/language_manual/var_substitution.html" rel="nofollow">documentation</a> specifies how one can substitute a variable, it does not seam to support lists.</p>
  
  <p>I have a query that needs to run for each day of a month, so I want to do something like this:</p>
  
  <pre><code>for day in days:
    ALTER TABLE foo ADD PARTITION(${day=hiveconf:day});
  </code></pre>
  
  <p>Is there a way to do this without! using some kind of scripting language like python/bash. </p>
  
  <p>I have a python implementation, but it need to start a new hive process for each query. Besides being ugly, this has bad performance for small queries because of the hive start-up-time.</p>