1

I have roughly 10 million records in Big Object and now I need to move the data/clone the records in another big Object.

The reason why I am doing this is that I need to modify/add more fields to the unique Key in Big Object. So, I have created a new big Object with a new unique key and now need to migrate the data into a new big Object.

I have tried with the data loader Bulk API checkbox, its gets error after some time (Failed to write query result- Internal Server Error).

What would be the best way to do that.

Thanks

0

If Data loader is not working, you must use a batch class, it should still be relatively simple.

You'd start by querying every single field from the object you want to transfer in the .start() function. Then in execute(), you'd create a new record for each original record in your scope, copy all the values, and at the end of the loop insert them.

Keep the batch size as per you need, default is 200 records.

| improve this answer | |
  • deleteImmediate() doesn't work on more than 1 record at a time, If I run a batch on 1 million records with batch size 1 would be a never-ending process. – user2815826 Jan 29 at 6:45
  • but why do you want to use deleteImmediate() method, we need to just migrate the data from one big object to other. Also, why to keep batch size as 1, are you running some major functionality on insert of data in that object? – ShrutiG Jan 29 at 8:41
  • Database.querylocator doesn't support big objects. Because count() is not available. I need to run multiple batches. And also need to delete data from older object – user2815826 Jan 30 at 7:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.