title: How to generate Date Series in HIVE? (Creating table)
body: <p>Suppose I currently have a table that has 1 row for each account and the data in the tables are:</p>
  
  <ol>
  <li>Account Number</li>
  <li>Start Date</li>
  <li>End Date</li>
  </ol>
  
  <p>Now I'd like to create a new table that has 1 row for each day the account is open, i.e. 1 day for each row between the start and end dates (inclusive) for each account.</p>
  
  <p>E.g. </p>
  
  <p><strong>Table 1</strong></p>
  
  <pre><code>Account Number    Start Date    End Date
  123               1-Jan-17      1-Jul-17
  456               1-Feb-17      4-May-17
  </code></pre>
  
  <p><strong>Table 2</strong> (Desired table)</p>
  
  <pre><code>Account Number    Day
  123               1-Jan-17
  123               1-Jan-17
       ...
  123               1-Jul-17
  456               1-Feb-17
  456               2-Feb-17
       ...
  456               4-May-17
  </code></pre>
  
  <p>I know in Postgresql there's a function called 'generate series' that would allow you to do that easily. I'm wondering if there's a similar function in HIVE that would allow you to do that as well?</p>
  
  <p>Thanks!</p>