+ Start a Discussion
svincentsvincent 

SForce Data Loader + Joined Tables

Forgive me if this has been asked before -- I searched, but failed to find answers in the archives.

I am evaluating salesforce.com for my employer, and am trying to do a test upload of my company's data, using the SForce Dataloader.

Creating the CSV files that conform to the salesforce.com data model is straightforward: we have tables corresponding to Accounts, Contacts, etc in our legacy system.

The problem I have is foreign key joins.

For example, I would like to create and import two CSV files, one containing Accounts and one containing Contacts. The Contact record requires a reference to the salesforce ID of the corresponding Account, but I don't have that: I haven't created the Account yet.

I can do a multi-pass import (import Accounts first, and then use the IDs created to create the Contact CSV), but I'd rather not -- how is this intended to work? I think I must be missing something.

Any help would be deeply appreciated!

Thanks,
-Shawn Vincent.

svincent@exalt.com
Ron HessRon Hess
for accounts and contacts, you should be able to use the import wizards built into the app, that way the inserts into both tables happen in one step.
svincentsvincent
Does that work for other tables as well, like Event and Task?

I've also run into the problem that Account is self-joined (parent Account, for example).

Is there any way of causing some Salesforce import pipeline to join tables based on my external id? Or must I just do multi-pass imports?

Thanks!
-Shawn.
Ron HessRon Hess
there is a custom object import wizard built into the app,
check it out, it may have the feature you are looking for

under Setup-> Data Management -> Import Custom Objects
https://na1.salesforce.com/ui/setup/imp/ImportWizardWelcomePage

don't know about events and activities, never tried that ( outside of a few times i used excel connector for that)
jeffstuitjeffstuit

svincent wrote:
The Contact record requires a reference to the salesforce ID of the corresponding Account, but I don't have that: I haven't created the Account yet.

I can do a multi-pass import (import Accounts first, and then use the IDs created to create the Contact CSV), but I'd rather not -- how is this intended to work? I think I must be missing something.

Any help would be deeply appreciated!

Thanks,
-Shawn Vincent.

svincent@exalt.com





I don't think you're going to be able to avoid doing a multi-pass import. When I converted our org's data, we had a data structure very similar to salesforce's, but it was all in SQL server, with it's own primary keys. I basically had to upload the account records, and then download the accountids + old primary key down into my database so I could build a cross-reference table that would let me link the new salesforce account records with my old contact records. I then had to do the same thing with contact records, so I could link them to the task/event records.

It was a very complex process, but it really paid off for us when we deployed salesforce at our company: the users had a pretty good idea of where the data was, because it was in a structure they were used to.

Good luck!

Jeff