How to Create a Data Set

Updated 1 week ago by Copado Solutions

In the Data Sets article, you learned about data sets and some of the uses this feature has. In this article, you will learn how to create a data set.

To build a data set, follow these steps:

  1. Navigate to the Data Sets tab and click on New.
  2. Give your data set a meaningful name and provide a description if desired.
  3. Select the data template that contains the data that will be used to create the data set in the Data Template lookup field. For more information about data templates and how to build a data template, check out the Data Templates article.
  4. Click on Save.
  5. Once you have configured your data set, click on Generate Data Set to actually generate the data:

Generate data set button

Please make sure the org you have selected to generate the data set is authenticated, otherwise you will receive an error.

Copado will generate two files and add them to the Files section of your data set:

  • A Lightning CSV file following the naming convention Filename: {DataTemplateRecordId}-{Data Template Name}.records.csv
  • A template file following the naming convention {DataTemplateRecordId}-{Data Template Name}.template. This template file is necessary for the correct functioning of the data set and cannot be deleted.

There will be a CSV file for each object. For example, if you have a template with accounts and contacts, the data set will include two CSV files, one for accounts and one for contacts.

You can find more information about file generation in the Last File Generation section of your data set:

Last File Generation section

Copado will trigger a deployment job to generate the files. Once the job is completed, the FIle Execution Status field will be set to Completed Successfully. If there is a problem generating your data set, a Completed with Errors status will be displayed. You can click on the Execution Job link to navigate to the deployment job and troubleshoot any potential issues.

Data set files support file versioning. Therefore, if you need to generate new files for an existing data set, Copado will generate a new version of each file rather than create brand new files. Alternatively, you can upload a new version of your CSV file by clicking on Upload New Version in the Files section:

Upload New Version button

For more information about CSV files and their formatting, review the article How to Upload a CSV File from an External System to a Data Set.

To delete previous versions of the files, simply click on Remove File Versions:

Remove File Versions button

If you have access to data sets, you can upload new file versions. However, to delete previous file versions, you need to be the owner of the file or have the Modify All Data permission.

Please note that you cannot delete a specific previous version of a file due to a Salesforce limitation. If you use the Remove File Versions button, Copado will remove all previous versions and just keep the latest one. Similarly, if you want to go back to a specific previous version of a file, you need to download the file with that version you want to restore and upload it as a new version.

There are some additional limitations regarding files of which you should be aware. For more information about this, check out Salesforce’s article Salesforce CRM Content Limits.

Now that you have your data set, it is time to deploy it to other environments. For more information about how to do this, refer to the article Deploying a Data Set.

How did we do?