title: Marklogic : Generate primary key while data ingestion
body: <p>I am ingesting data from CSV using java-api. I have to maintain the primary key of each document.</p>
  
  <blockquote>
    <p>Does marklogic provide any unique auto-generated id during insert ?</p>
  </blockquote>
  
  <p>If marklogic do not provide then i can think of one thing which is random generated hexString  number but problem is if i have large number of record in CSV to ingest, sometime this random number might repeat.</p>
  
  <p>Please suggest me how to proceed with this use case. </p>