SlideShare a Scribd company logo
1 of 3
Link child record with the respective parent
record in Target org. using Talend.
While migrating the child records from one Salesforce org.(OrgA) to
another(OrgB) I was facing hard time to link the child record with the
respective parent record in target org.(OrgB). Because when you create new
record in Salesforce it will create it with the unique Id in target
Org.(OrgB).
I though this would be the common scenario while migrating data from one
Org. to another. So, I am going to provide you the step by step process to
link the child record with the respective parent record:
1. First thing you need to do is to create a custom field say
ExternalIdField on Account object in target org.(OrgB) and select the
External ID check box.
2. Follow the steps which I have provided in my previous post to make the
connection between source org. to target org.
3. We use tMap to create the mapping between the org.'s, double click on
it and link the id field of Account(OrgA) to the ExtenalIdField custom
field on target org.(OrgB).
4. Run the job, it will migrate account records from OrgA to OrgB.
5. Next time when you do the same for child records say Contact records;
first fetch the child records(tSalesforceInput) from OrgA and Parent
record (tSalesforceInput) from OrgB.(Select id, ExternalIdField__c from
Account).
6. Drag the tMap and tSalesforceOutput(OrgB) component into the designer
view.
7. Now double click on tMap componet, it will open the new window, on the
left hand side you must be seeing two table(Contact (OrgA) and
Account(OrgB) tables),
drag the look up field of Contact into ExternalIdField of Account, in this
way you have link the lookup field of Contact(OrgA) with the
ExternalIdField(OrgB).
8. After that, drag the id field of Account(OrgB) to the Account lookup
field on Contact(OrgB) on the right side of the tMap component, in this
way you are inserting the Account(OrgB) id into the lookup field of
Contact(OrgB).
9. Now just run the job, it will insert the contact record and will link
it with the parent record as well in the target org.(OrgB).

Data Loader and relationships
Moving data between two Salesforce Orgs can happen in the context of refreshing a Full Copy Sandbox
instance with data from the Production instance. However, there are cases where data has to be moved
from one Sandbox instance into another, or from a Production instance into a Config/Developer Sandbox.
In such cases, the trickiest part of migrating the data is maintaining the relationships (lookup or masterdetail) between Objects.
For example, take the case of Opportunities and Accounts. Opportunity data exported from the source
Salesforce Org. would have references to Account ID’s that are specific to the source Org. When trying to
import this data into the destination Salesforce Org, those IDs would not exist and the Opportunities
would therefore not be associated with their respective Accounts.
A combination of External Id fields and the Data Loader ‘Upsert’ command can however move data from
one Salesforce Org to another while maintaining all relationships. Using the Opportunity and Account
standard Objects as an example, the step-by-step process is as follows:
1) In the destination Organization, on the Parent Object (in this case, Account), create a new field of type
Text and mark it as an ‘External Id’ field. Be sure to make the length of the field at least 18 characters
(the size of the Salesforce ID field). Let’s call this new field on Account – ‘Source Acct ID’.
2) Export the Parent Object (in this case, Account) data from the source Organization into a csv file using
Data Loader. Be sure to include the ‘Id’ field when exporting this data.
3) Insert the data from Step 2 into the destination Organization using Data Loader. In the mapping screen
of Data Loader, map the ‘ID’ field from the csv file to the new field created in Step 1 (in this case,
‘Source Acct ID’).
4) Export the Child Object (in this case, Opportunity) data from the source Organization into a csv file
using Data Loader. Be sure to include the relationship field (in this case ‘AccountID’) when exporting
this data.
5) Upsert the data from Step 4 into the destination Organization using Data Loader. In Step 2a of the Data
Loader, select ‘ID’ as the field to use for matching Opportunities. In Step 2b of the Data Loader, select
the field created in Step 1 (in this case, ‘Source Acct ID’) as the field to match the parent object. In the
next mapping step of the Data Loader, map the ‘AccountId’ column of the csv file to the ‘Account:Source
Acct ID’ field. This will allow the Data Loader to associate each Opportunity record with its respective
parent Account record. Note that the ‘AccountId’ column of the CSV file should NOT be mapped to the
standard ‘AccountId’ field (which is what the Data Loader does by default with the ‘Auto-Match Fields to
Columns’ option). Instead, it has to be mapped to the ‘Account:Source Acct ID’ field.
6) After finishing the data import, the new field created in Step 1 (‘Source Acct ID’) may be deleted as it
was only necessary for the data import process.

More Related Content

What's hot

How to geocode using AbbyisQueen
How to geocode using AbbyisQueenHow to geocode using AbbyisQueen
How to geocode using AbbyisQueenWansoo Im
 
Tutorial on how to load images in crystal reports dynamically using visual ba...
Tutorial on how to load images in crystal reports dynamically using visual ba...Tutorial on how to load images in crystal reports dynamically using visual ba...
Tutorial on how to load images in crystal reports dynamically using visual ba...Aeric Poon
 
Integrate applications
Integrate applicationsIntegrate applications
Integrate applicationsSumama Shakir
 
Guide excel lessons 4 (v1.0 jmd 10.04.2020)
Guide   excel lessons 4 (v1.0 jmd 10.04.2020)Guide   excel lessons 4 (v1.0 jmd 10.04.2020)
Guide excel lessons 4 (v1.0 jmd 10.04.2020)Hity
 
Guide to the transition of typed reports via
Guide to the transition of typed reports viaGuide to the transition of typed reports via
Guide to the transition of typed reports viaRandy Rigney
 
Handouts how to use microsoft access to conduct an overlap analysis
Handouts how to use microsoft access to conduct an overlap analysisHandouts how to use microsoft access to conduct an overlap analysis
Handouts how to use microsoft access to conduct an overlap analysisCharleston Conference
 
Hyperion analyzer 31 july
Hyperion analyzer 31 julyHyperion analyzer 31 july
Hyperion analyzer 31 julyAmit Sharma
 
Basic Pivot Features In Collabion Charts For SharePoint
Basic Pivot Features In Collabion Charts For SharePointBasic Pivot Features In Collabion Charts For SharePoint
Basic Pivot Features In Collabion Charts For SharePointCollabion Technologies
 
Crystal reports seminar
Crystal reports seminarCrystal reports seminar
Crystal reports seminarteope_ruvina
 
Attachments in IBM Maximo Asset Management
Attachments in IBM Maximo Asset ManagementAttachments in IBM Maximo Asset Management
Attachments in IBM Maximo Asset ManagementRobert Zientara
 
Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Slideshare
 
Smart Sheet Range for Excel - Collabion Charts For SharePoint
Smart Sheet Range for Excel - Collabion Charts For SharePointSmart Sheet Range for Excel - Collabion Charts For SharePoint
Smart Sheet Range for Excel - Collabion Charts For SharePointCollabion Technologies
 
Color Your Single-Series Charts The Way You Like
Color Your Single-Series Charts The Way You LikeColor Your Single-Series Charts The Way You Like
Color Your Single-Series Charts The Way You LikeCollabion Technologies
 
TimeCard for SharePoint - Overview
TimeCard for SharePoint - OverviewTimeCard for SharePoint - Overview
TimeCard for SharePoint - OverviewPeter Kalmstrom
 
Kudo Codefest: Faster data retrival with SQL query optimization
Kudo Codefest: Faster data retrival with SQL query optimizationKudo Codefest: Faster data retrival with SQL query optimization
Kudo Codefest: Faster data retrival with SQL query optimizationKudo Developers
 
Bis245 week 4 i lab devry university er diagram
Bis245 week 4 i lab devry university   er diagramBis245 week 4 i lab devry university   er diagram
Bis245 week 4 i lab devry university er diagramdhfghfgfjgjgfj
 

What's hot (20)

How to geocode using AbbyisQueen
How to geocode using AbbyisQueenHow to geocode using AbbyisQueen
How to geocode using AbbyisQueen
 
Tutorial on how to load images in crystal reports dynamically using visual ba...
Tutorial on how to load images in crystal reports dynamically using visual ba...Tutorial on how to load images in crystal reports dynamically using visual ba...
Tutorial on how to load images in crystal reports dynamically using visual ba...
 
Automotive industry ppt
Automotive industry pptAutomotive industry ppt
Automotive industry ppt
 
Integrate applications
Integrate applicationsIntegrate applications
Integrate applications
 
Guide excel lessons 4 (v1.0 jmd 10.04.2020)
Guide   excel lessons 4 (v1.0 jmd 10.04.2020)Guide   excel lessons 4 (v1.0 jmd 10.04.2020)
Guide excel lessons 4 (v1.0 jmd 10.04.2020)
 
Guide to the transition of typed reports via
Guide to the transition of typed reports viaGuide to the transition of typed reports via
Guide to the transition of typed reports via
 
Crystal report
Crystal reportCrystal report
Crystal report
 
Handouts how to use microsoft access to conduct an overlap analysis
Handouts how to use microsoft access to conduct an overlap analysisHandouts how to use microsoft access to conduct an overlap analysis
Handouts how to use microsoft access to conduct an overlap analysis
 
Hyperion analyzer 31 july
Hyperion analyzer 31 julyHyperion analyzer 31 july
Hyperion analyzer 31 july
 
VB6 Using ADO Data Control
VB6 Using ADO Data ControlVB6 Using ADO Data Control
VB6 Using ADO Data Control
 
Basic Pivot Features In Collabion Charts For SharePoint
Basic Pivot Features In Collabion Charts For SharePointBasic Pivot Features In Collabion Charts For SharePoint
Basic Pivot Features In Collabion Charts For SharePoint
 
Crystal reports seminar
Crystal reports seminarCrystal reports seminar
Crystal reports seminar
 
Attachments in IBM Maximo Asset Management
Attachments in IBM Maximo Asset ManagementAttachments in IBM Maximo Asset Management
Attachments in IBM Maximo Asset Management
 
Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010Crystal report generation in visual studio 2010
Crystal report generation in visual studio 2010
 
Smart Sheet Range for Excel - Collabion Charts For SharePoint
Smart Sheet Range for Excel - Collabion Charts For SharePointSmart Sheet Range for Excel - Collabion Charts For SharePoint
Smart Sheet Range for Excel - Collabion Charts For SharePoint
 
Color Your Single-Series Charts The Way You Like
Color Your Single-Series Charts The Way You LikeColor Your Single-Series Charts The Way You Like
Color Your Single-Series Charts The Way You Like
 
TimeCard for SharePoint - Overview
TimeCard for SharePoint - OverviewTimeCard for SharePoint - Overview
TimeCard for SharePoint - Overview
 
Assignment in era
Assignment in eraAssignment in era
Assignment in era
 
Kudo Codefest: Faster data retrival with SQL query optimization
Kudo Codefest: Faster data retrival with SQL query optimizationKudo Codefest: Faster data retrival with SQL query optimization
Kudo Codefest: Faster data retrival with SQL query optimization
 
Bis245 week 4 i lab devry university er diagram
Bis245 week 4 i lab devry university   er diagramBis245 week 4 i lab devry university   er diagram
Bis245 week 4 i lab devry university er diagram
 

Similar to Data migration

Angular 12 CRUD Example with Web API
Angular 12 CRUD Example with Web APIAngular 12 CRUD Example with Web API
Angular 12 CRUD Example with Web APICodingvila
 
FDMEE script examples
FDMEE script examplesFDMEE script examples
FDMEE script examplesAmit Sharma
 
FDMEE script examples
FDMEE script examplesFDMEE script examples
FDMEE script examplesAmit Soni
 
Scripted Data Loads with Salesforce DataLoader and ANT
Scripted Data Loads with Salesforce DataLoader and ANTScripted Data Loads with Salesforce DataLoader and ANT
Scripted Data Loads with Salesforce DataLoader and ANTSalesforce Developers
 
INTRODUCTION TO CaseWare IDEAProvided by Audimation Services, .docx
INTRODUCTION TO CaseWare IDEAProvided by Audimation Services, .docxINTRODUCTION TO CaseWare IDEAProvided by Audimation Services, .docx
INTRODUCTION TO CaseWare IDEAProvided by Audimation Services, .docxnormanibarber20063
 
File based loader FBL Oracle Fusion
File based loader FBL Oracle FusionFile based loader FBL Oracle Fusion
File based loader FBL Oracle FusionFeras Ahmad
 
Marketing Cloud - Cross Cloud Architecture - Identity Design - August 2023.pdf
Marketing Cloud - Cross Cloud Architecture - Identity Design - August 2023.pdfMarketing Cloud - Cross Cloud Architecture - Identity Design - August 2023.pdf
Marketing Cloud - Cross Cloud Architecture - Identity Design - August 2023.pdfKenneth Wagner
 
CS1100 Access Lab 1 Creating and Querying Database.docx
CS1100 Access Lab 1  Creating and Querying Database.docxCS1100 Access Lab 1  Creating and Querying Database.docx
CS1100 Access Lab 1 Creating and Querying Database.docxfaithxdunce63732
 
Dataweavewithflowreflookup
DataweavewithflowreflookupDataweavewithflowreflookup
Dataweavewithflowreflookuphimajareddys
 
Check printing in_r12
Check printing in_r12Check printing in_r12
Check printing in_r12Rajesh Khatri
 
Mule data weave with flowref lookup
Mule data weave with flowref lookupMule data weave with flowref lookup
Mule data weave with flowref lookupD.Rajesh Kumar
 
Rational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORSRational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORSGEBS Reporting
 
Informatica complex transformation i
Informatica complex transformation iInformatica complex transformation i
Informatica complex transformation iAmit Sharma
 
Open microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutletOpen microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutletMitchinson
 
on SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdfon SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdfformaxekochi
 
Be sure to read all of Chapters 8 and 9 before starting this assignm.docx
Be sure to read all of Chapters 8 and 9 before starting this assignm.docxBe sure to read all of Chapters 8 and 9 before starting this assignm.docx
Be sure to read all of Chapters 8 and 9 before starting this assignm.docxaman341480
 
Once the Application has started up and you are at the Start Page, s.docx
Once the Application has started up and you are at the Start Page, s.docxOnce the Application has started up and you are at the Start Page, s.docx
Once the Application has started up and you are at the Start Page, s.docxarnit1
 
Eloqua configuration for kwanzoo lead form campaigns
Eloqua configuration for kwanzoo lead form campaignsEloqua configuration for kwanzoo lead form campaigns
Eloqua configuration for kwanzoo lead form campaignsKwanzoo Inc
 
This is part 1 of 3STEP 1 Modify the clsDataLayer to Use a Two-St.docx
This is part 1 of 3STEP 1 Modify the clsDataLayer to Use a Two-St.docxThis is part 1 of 3STEP 1 Modify the clsDataLayer to Use a Two-St.docx
This is part 1 of 3STEP 1 Modify the clsDataLayer to Use a Two-St.docxabhi353063
 
285295780-SAP-BW-Info-Provider.ppt
285295780-SAP-BW-Info-Provider.ppt285295780-SAP-BW-Info-Provider.ppt
285295780-SAP-BW-Info-Provider.pptntrnbk
 

Similar to Data migration (20)

Angular 12 CRUD Example with Web API
Angular 12 CRUD Example with Web APIAngular 12 CRUD Example with Web API
Angular 12 CRUD Example with Web API
 
FDMEE script examples
FDMEE script examplesFDMEE script examples
FDMEE script examples
 
FDMEE script examples
FDMEE script examplesFDMEE script examples
FDMEE script examples
 
Scripted Data Loads with Salesforce DataLoader and ANT
Scripted Data Loads with Salesforce DataLoader and ANTScripted Data Loads with Salesforce DataLoader and ANT
Scripted Data Loads with Salesforce DataLoader and ANT
 
INTRODUCTION TO CaseWare IDEAProvided by Audimation Services, .docx
INTRODUCTION TO CaseWare IDEAProvided by Audimation Services, .docxINTRODUCTION TO CaseWare IDEAProvided by Audimation Services, .docx
INTRODUCTION TO CaseWare IDEAProvided by Audimation Services, .docx
 
File based loader FBL Oracle Fusion
File based loader FBL Oracle FusionFile based loader FBL Oracle Fusion
File based loader FBL Oracle Fusion
 
Marketing Cloud - Cross Cloud Architecture - Identity Design - August 2023.pdf
Marketing Cloud - Cross Cloud Architecture - Identity Design - August 2023.pdfMarketing Cloud - Cross Cloud Architecture - Identity Design - August 2023.pdf
Marketing Cloud - Cross Cloud Architecture - Identity Design - August 2023.pdf
 
CS1100 Access Lab 1 Creating and Querying Database.docx
CS1100 Access Lab 1  Creating and Querying Database.docxCS1100 Access Lab 1  Creating and Querying Database.docx
CS1100 Access Lab 1 Creating and Querying Database.docx
 
Dataweavewithflowreflookup
DataweavewithflowreflookupDataweavewithflowreflookup
Dataweavewithflowreflookup
 
Check printing in_r12
Check printing in_r12Check printing in_r12
Check printing in_r12
 
Mule data weave with flowref lookup
Mule data weave with flowref lookupMule data weave with flowref lookup
Mule data weave with flowref lookup
 
Rational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORSRational Publishing Engine with Rational DOORS
Rational Publishing Engine with Rational DOORS
 
Informatica complex transformation i
Informatica complex transformation iInformatica complex transformation i
Informatica complex transformation i
 
Open microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutletOpen microsoft visual studio/tutorialoutlet
Open microsoft visual studio/tutorialoutlet
 
on SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdfon SQL Managment studio(For the following exercise, use the Week 5.pdf
on SQL Managment studio(For the following exercise, use the Week 5.pdf
 
Be sure to read all of Chapters 8 and 9 before starting this assignm.docx
Be sure to read all of Chapters 8 and 9 before starting this assignm.docxBe sure to read all of Chapters 8 and 9 before starting this assignm.docx
Be sure to read all of Chapters 8 and 9 before starting this assignm.docx
 
Once the Application has started up and you are at the Start Page, s.docx
Once the Application has started up and you are at the Start Page, s.docxOnce the Application has started up and you are at the Start Page, s.docx
Once the Application has started up and you are at the Start Page, s.docx
 
Eloqua configuration for kwanzoo lead form campaigns
Eloqua configuration for kwanzoo lead form campaignsEloqua configuration for kwanzoo lead form campaigns
Eloqua configuration for kwanzoo lead form campaigns
 
This is part 1 of 3STEP 1 Modify the clsDataLayer to Use a Two-St.docx
This is part 1 of 3STEP 1 Modify the clsDataLayer to Use a Two-St.docxThis is part 1 of 3STEP 1 Modify the clsDataLayer to Use a Two-St.docx
This is part 1 of 3STEP 1 Modify the clsDataLayer to Use a Two-St.docx
 
285295780-SAP-BW-Info-Provider.ppt
285295780-SAP-BW-Info-Provider.ppt285295780-SAP-BW-Info-Provider.ppt
285295780-SAP-BW-Info-Provider.ppt
 

More from mallareddy0107

More from mallareddy0107 (9)

Approval process
Approval processApproval process
Approval process
 
Interview questions
Interview questionsInterview questions
Interview questions
 
Interview questions
Interview   questionsInterview   questions
Interview questions
 
Hr interview
Hr interviewHr interview
Hr interview
 
Governor limits
Governor limitsGovernor limits
Governor limits
 
Coding standards
Coding standardsCoding standards
Coding standards
 
Sfdc Knowledge
Sfdc KnowledgeSfdc Knowledge
Sfdc Knowledge
 
Approvals and workflow in salesforce
Approvals and workflow in salesforceApprovals and workflow in salesforce
Approvals and workflow in salesforce
 
Approval process
Approval processApproval process
Approval process
 

Data migration

  • 1. Link child record with the respective parent record in Target org. using Talend. While migrating the child records from one Salesforce org.(OrgA) to another(OrgB) I was facing hard time to link the child record with the respective parent record in target org.(OrgB). Because when you create new record in Salesforce it will create it with the unique Id in target Org.(OrgB). I though this would be the common scenario while migrating data from one Org. to another. So, I am going to provide you the step by step process to link the child record with the respective parent record: 1. First thing you need to do is to create a custom field say ExternalIdField on Account object in target org.(OrgB) and select the External ID check box. 2. Follow the steps which I have provided in my previous post to make the connection between source org. to target org. 3. We use tMap to create the mapping between the org.'s, double click on it and link the id field of Account(OrgA) to the ExtenalIdField custom field on target org.(OrgB). 4. Run the job, it will migrate account records from OrgA to OrgB. 5. Next time when you do the same for child records say Contact records; first fetch the child records(tSalesforceInput) from OrgA and Parent record (tSalesforceInput) from OrgB.(Select id, ExternalIdField__c from Account). 6. Drag the tMap and tSalesforceOutput(OrgB) component into the designer view. 7. Now double click on tMap componet, it will open the new window, on the left hand side you must be seeing two table(Contact (OrgA) and Account(OrgB) tables), drag the look up field of Contact into ExternalIdField of Account, in this way you have link the lookup field of Contact(OrgA) with the ExternalIdField(OrgB). 8. After that, drag the id field of Account(OrgB) to the Account lookup field on Contact(OrgB) on the right side of the tMap component, in this
  • 2. way you are inserting the Account(OrgB) id into the lookup field of Contact(OrgB). 9. Now just run the job, it will insert the contact record and will link it with the parent record as well in the target org.(OrgB). Data Loader and relationships Moving data between two Salesforce Orgs can happen in the context of refreshing a Full Copy Sandbox instance with data from the Production instance. However, there are cases where data has to be moved from one Sandbox instance into another, or from a Production instance into a Config/Developer Sandbox. In such cases, the trickiest part of migrating the data is maintaining the relationships (lookup or masterdetail) between Objects. For example, take the case of Opportunities and Accounts. Opportunity data exported from the source Salesforce Org. would have references to Account ID’s that are specific to the source Org. When trying to import this data into the destination Salesforce Org, those IDs would not exist and the Opportunities would therefore not be associated with their respective Accounts. A combination of External Id fields and the Data Loader ‘Upsert’ command can however move data from one Salesforce Org to another while maintaining all relationships. Using the Opportunity and Account standard Objects as an example, the step-by-step process is as follows: 1) In the destination Organization, on the Parent Object (in this case, Account), create a new field of type Text and mark it as an ‘External Id’ field. Be sure to make the length of the field at least 18 characters (the size of the Salesforce ID field). Let’s call this new field on Account – ‘Source Acct ID’. 2) Export the Parent Object (in this case, Account) data from the source Organization into a csv file using Data Loader. Be sure to include the ‘Id’ field when exporting this data. 3) Insert the data from Step 2 into the destination Organization using Data Loader. In the mapping screen of Data Loader, map the ‘ID’ field from the csv file to the new field created in Step 1 (in this case, ‘Source Acct ID’). 4) Export the Child Object (in this case, Opportunity) data from the source Organization into a csv file using Data Loader. Be sure to include the relationship field (in this case ‘AccountID’) when exporting this data. 5) Upsert the data from Step 4 into the destination Organization using Data Loader. In Step 2a of the Data Loader, select ‘ID’ as the field to use for matching Opportunities. In Step 2b of the Data Loader, select the field created in Step 1 (in this case, ‘Source Acct ID’) as the field to match the parent object. In the next mapping step of the Data Loader, map the ‘AccountId’ column of the csv file to the ‘Account:Source Acct ID’ field. This will allow the Data Loader to associate each Opportunity record with its respective parent Account record. Note that the ‘AccountId’ column of the CSV file should NOT be mapped to the
  • 3. standard ‘AccountId’ field (which is what the Data Loader does by default with the ‘Auto-Match Fields to Columns’ option). Instead, it has to be mapped to the ‘Account:Source Acct ID’ field. 6) After finishing the data import, the new field created in Step 1 (‘Source Acct ID’) may be deleted as it was only necessary for the data import process.