title: How to create an unique autogenerated Id column in a spark dataframe
body: <p>I have a dataframe where I have to generate a unique Id in one of the columns. This id has to be generated with an offset.
  Because , I need to persist this dataframe with the autogenerated id , now if new data comes in the autogenerated id should not collide with the existing ones.
  I checked the monotonically increasing function but it does not accept any offset . 
  This is what I tried :</p>
  
  <pre><code>df=df.coalesce(1);
  df = df.withColumn(inputCol,functions.monotonically_increasing_id());
  </code></pre>
  
  <p>But is there a way to make the monotonically_increasing_id() start from a starting offset ?</p>