title: ROWNUM or ROWID in google bigquery
body: <p>porting some stuff to bigquery, and come across an issue.
  We have a bunch of data with no unique key value. Unfortuantely some report logic requires a unique value for each row.</p>
  
  <p>So in systems like Oracle I would just user the <code>ROWNUM</code> or <code>ROWID</code> psudeo columns.</p>
  
  <p>In vertica, which doesn't have those psudeo columns I would use <code>ROW_NUMBER() OVER()</code>. But in bigquery that is failing with the error:</p>
  
  <pre><code>'dataset:bqjob_r79e7b4147102bdd7_0000016482b3957c_1': Resources exceeded during query execution: The query could not be executed in the allotted memory.
  OVER() operator used too much memory..
  </code></pre>
  
  <p>The value does not have to be persistent, just a unique value within the query results.</p>
  
  <p>Would like to avoid extract-process-reload if possible.</p>
  
  <p>So is there any way to assign a unqiue value to query result rows in bigquery SQL?</p>
  
  <p>Edit: Sorry, should have clarified. Using standard sql, not legacy</p>