I have changed the structure of my database and now I need to export some data in order to insert it into the new structure. I need to query data from two related objects and the relation needs to stay intact when importing it again, so I cannot use dataloader as I cannot query related objects. I also need to export nearly 200000 records, so I was wondering what you can recommend to do that?


3 Answers 3


DemandTools from CRMFusion can export data from a child object along with parent, grandparent etc data. I've used it to do that many times. I'm not sure exactly how many levels up you can go. I'm certain that grandparent is possible. I'm fairly certain great-grandparent works, but I don't have any examples handy. The results go to an Excel file by default, but other formats are possible.

The tool you want within DemandTools is Mass Effect. You can read more about it here.

I don't work for CRMFusion; I'm just a satisfied customer.


I would recommend using Jitterbit's free data loader and doing the following:
1. export parent data from old parent object
2. create field on new parent object prod_id 18 character external id
3. import parent data into new parent object matching the id to the prod_id
4. export child data from old child object
5. import child data into new child object matching to parent prod_id
As far as I know you cannot export the parent with child data and then directly import it back in while keeping the relationship in tact.

  • My Query actually looks like this: Select Name, Id, Number__c, (Select Number__c, Policy_Number__c From Policies__r) From Opportunity and my new DB structure has 1 junction object, in which I need to store Number__c and Policy_Number__c, so not quite sure how to do this following your instructions.
    – Lily
    Commented Dec 15, 2014 at 22:43
  • If I understand your structure you should be able to create the prod_id external id on the Policies object as well and import the Policies matching the id to the prod_id. Then insert into your junction object by matching both parent id's to their matching external prod_ids.
    – Jenny B
    Commented Dec 15, 2014 at 23:00

As the data loader does not support the nested query, create report using cross filter formula so that it will pull records from related objects and then convert it into .csv format. After that you can import it into database.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .