title: Incremental integer ID in Impala
body: <p>I am using <em>Impala</em> for querying <code>parquet</code>-tables and cannot find a solution to increment an <code>integer</code>-column ranging from <code>1..n</code>. The column is supposed to be used as ID-reference. Currently I am aware of the <code>uuid()</code> function, which</p>
  <blockquote>
  <p>Returns a universal unique identifier, a 128-bit value encoded as a string with groups of hexadecimal digits separated by dashes.</p>
  </blockquote>
  <p>Anyhow, this is not suitable for me since I have to pass the ID to another system which requests an ID in style of <code>1..n</code>. I also already know that Impala has no <code>auto-increment</code>-implementation.</p>
  <p>The desired result should look like:</p>
  <pre class="lang-sql prettyprint-override"><code>-- UUID() provided as example - I want to achieve the `my_id`-column.
  
  | my_id | example_uuid | some_content |
  |-------|--------------|--------------|
  | 1     | 50d53ca4-b...| &quot;a&quot;          |
  | 2     | 6ba8dd54-1...| &quot;b&quot;          |
  | 3     | 515362df-f...| &quot;c&quot;          |
  | 4     | a52db5e9-e...| &quot;d&quot;          |
  |-------|--------------|--------------|
  </code></pre>
  <p>How can I achieve the desired result (<code>integer</code>-ID ranging from <code>1..n</code>)?</p>
  <hr />
  <p><em>Note: This question differs from <a href="https://stackoverflow.com/questions/37440007/kudu-auto-generated-key-column/44093007#44093007">this one</a> which specifically handles Kudu-tables. However, answers should be applicable for this question as well.</em></p>