I am planning on transforming a large data set from my mongo database and creating a new collection from the transformed documents. I wanted to do this as part of a single aggregation to stop round trips back and forth from the server and the database. Our application automatically enforces String type ID's, so I cannot use the automatic _ids generated by $out / $merge as these are ObjectIds()
Obviously I can pull the data down and generate a unique string ID for each document then insert them but I was hoping for a way to do this within a single aggregation query. Any ideas?