Microsoft Cosmosdb for Mongodb: merge unsharded collection into sharded ones
问题 I have 2 collections of similar documents(i.e. same object, different values). One collection(X) is unsharded in database A, another collection(Y) is sharded and inside database B. When I try copy collection X into database B, I got error saying that "Shared throughput collection should have a partition key". I also tried copying data using foreach insert, but it takes too long time. So my question is, how can I append the data from collection X to collection Y in efficient way? Mongodb