function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
Raghu Sharma 6Raghu Sharma 6 

bulk load using data loader

I'm planning to do bulk load using data loader (enabling 'USE Bulk API' in settings). As data loader parallely runs multiple batches at a time, how can we handle hierarchies (for eg, account hierarchy) for the object? I mean to say, if the parent account is not loaded yet, child account will fail saying parent is not found. How can we handle this situation?

 
Geoffrey J FlynnGeoffrey J Flynn
Hi Raghu,

How were you planning to handle the Hierarchy had you not been using the Bulk API?

Either way you still need the ID of the parent account to populate that field on the child.

For a hierachy, I would say load them all at once as a flat (no hierarchy) setup, and then go back and update the Parent ID field for each account since you now have all Salesforce IDs in the system.  I don't see how you would load a hierarchy with the dataloader all in one shot, whether you are using the Bulk API or not.
Raghu Sharma 6Raghu Sharma 6
Thanks Geoffrey for your reply.....Logically your approach is good...As I have huge number of accounts, I'm looking for some solution to optimise/reduce the effort on mapping after the accounts are loaded.