Deployment Step: Data

Updated 2 days ago by Copado Solutions

This article is part of the Deployment Steps.

The Data deployment step lets you deploy records from one org to another based on a SOQL query.

In this step, records are migrated using the Upsert call of the SOAP API, meaning that new records will be created if they do not exist, and existing records will be updated.

Notes:

  • The batch size is 200.
    • It's possible to change the default batch size (200 records) by adding the following text to the Step name ":batch=N" where N is greater than 0 and less than 200. Here is an example of a step name where the batch size has been set to 20: "Accounts :batch=20".
  • The fields included in the query are expected to exist in the destination org (with the same API names and data types).
  • Data transformation is currently not supported.

Deploying Related Records (Relationships)

By creating multiple data steps, you can deploy related records (relationships). For instance, if you are deploying account records and you want to include related contacts, invoices and invoice Items, you will then need to create 4 Data deployment steps in the following order:

Step 1: SELECT External_Id__c, Name from Account

Step 2: SELECT External_Id__c, Lastname, Account.External_Id__c from Contact

Step 3: SELECT External_Id__c, Date__c, Number__c, Account__r.External_Id__c, Billing_Contact__r.External_Id__c from Invoice__c

Step 4: SELECT External_Id__c, Quantity__c, Unit_Price__c, Invoice__r.External_Id__c from Invoice_Item__c

You can make Environment Variables apply to Data deployments by adding ":applyEnv=true" to the step name. 
Having a data backup will let you revert a Data deployment in case the query was not well suited to your requirements.


How did we do?