I have a data extension called "master-data-extension" in ET. my objective is to insert new data extension objects in this "master-data-extension" without overwriting the existing ones. So far I have tried using 'UpdateRequest'.
UpdateRequest update = new UpdateRequest();
UpdateOptions options = new UpdateOptions();
update.setOptions(options);
update.getObjects().addAll(request.getObjects());
UpdateResponse response = exactTargetService.update(update);
But the problem with this procedure as mentioned, it overwrites the new records with the existing ones. An alternative would be to retrieve all of the existing data extension objects from master data extension and then add them with the new objects and insert all of them together. I could go with this approach but the problem is the master data extension would be retrieved and modified by more than one instance of my application concurrently. for example
think of two reqeusts who would get two different instances of my application. one of them retrieved existing dataextension objects from master data extension and still in the process of adding them with the new objects, while the other request is already completed. So now if the first request goes and update the master data extension, I would loose the data objects inserted by the second request.
I might be overreacting may be there is a simpler solution. but I dont know whats gonna happen with the above solution.
I would appreciate any comments or suggestion or solution.