Skip to content

Export and import data for Microsoft Dataverse as an XrmToolBox plugin. Supports JSON and CSV.

License

Notifications You must be signed in to change notification settings

Capgemini/xrm-datamigration-xrmtoolbox

Repository files navigation

CDS Data Migrator Guide

Content


CI Build status Nuget

Introduction

The CDS Data Migrator tool provides an easy to use interface that enables you to generate an XML schema file that can be used to export data from one CRM environment and import into another. The tool not only supports the ability to add entity attributes and many-to-many relationships to the schema, but beyond that, it supports the creation of filters and GUID mappings which are stored as JSON file formats.

Video Intro

CDS Data Migrator - Intro

Use Cases

A major benefit of the CDS Data Migrator is that it has data obfuscation built in. For example, sample production data might contain confidential information such as names, email and GUIDs which should not exist in other environments. When import this data into another environment such as test or UAT then the tool can be configured to scrabble select entity fields during the import. Strings are scrabbled by replacing a value with a new value of the same length but with random characters (A-Z a-z 0-9). Numbers are scrabbled to another random number. If you need to move reference/configuration data from development into other environments such as test, UAT or production then this tool saves time as the configuration would only need to be done once and then can be replicated in other environments seamlessly using the tool. This includes entities such as Calendars, Business Units, Teams, and Organisation Settings.

Feature Comparison

Below is a table comparing the CDS Data Migrator tool with Microsoft's.

Feature MSFT Configuration Migration Tool CDS Data Migrator
Supports attributes in schema Yes Yes
Supports many to many relationships in schema Yes Yes
Schema Validation Yes No
Modification of existing schema Yes Yes
Exporting of data from a single environment using schema Yes Yes
Error logging on data export / import process Yes Yes
Colour coded sorting applied to attributes No Yes
Apply GUID Mappings included in export / import process No Yes
Apply Filters included in the export / import process No Yes
Ability to migrate Teams Yes Yes
Ability to migrate Calendars No Yes
Ability to migrate Business Units Yes Yes

Installation

Before using the CDS Data Migrator, you will need to install XrmToolBox which can be downloaded from here

Once XrmToolBox is installed, launch it and then select the Tool Library through Configuration menu as shown below: Select Tool Library

Then search for "CDS Data Migrator", select and Install it: Search for CDS Data Migrator

Once the installation has completed successfully, you will see the CDS Data Migrator listed in the Tools windows as shown below: CDS Data Migrator

Click the data migrator to launch it. You will be prompted for a connection to Dynamics 365 organization as shown below:

Connectionstring prompt

Connect to an environment and you will be taken to the Schema Configs page as shown below: Schema Configs page

Data Import and Export Schema Generation

The data migrator adheres to a predefined import export schema and the tool can be used to generate the respective schema for import and export. Note that for each of these, both the JSON and CSV formats are supported.

To generate or modify a schema, please follow the steps below:

  1. Select Schema Config from the top ribbon if you are not on this page already.

  2. If you have an existing schema, you can click on Load Schema to edit that file. This will pre-select the entities, attributes and relationships stored in that file.

  3. Select/unselect the entities, attributes, and relationships to export/import. In this example, we are creating a schema file for Accounts although you can select multiple entities. Select Schema Configs

  4. To save the file, click on Save Schema. Save Schema File

Your schema file will be saved at the specified location. This file will contain all selected entities and their respective selected attributes and relationships.

Below shows an example schema file:

Schema Config Example

Export Config File

The export config file gives you additional control and features over Microsoft's Configuration Migration Tool. You can understand these options further here.

To create or update an export config:

  1. Select Data Export from the top ribbon which will bring you to the below page: Initial Export Page

  2. If you have an existing export config file, you can click on Load to edit that file. This will pre-input the configs that you had stored in that file. Load Export Config file

  3. Adjust the fetch and write settings accordingly and ensure you add a schema file. Edited Export Config file

  4. To save the new or updated export config file, click on Save. Save Export Configs

Your export configs file will be saved at the specified location.

Below shows an example export config file:

Export Config Example

Import Config File

The import config file gives you additional control and features over Microsoft's Configuration Migration Tool. You can understand these options further here.

To create or update an import config:

  1. Select Data Import from the top ribbon which will bring you to the below page: Initial Export Page

  2. If you have an existing import config file, you can click on Load to edit that file. This will pre-input the configs that you had stored in that file. Load Import Config file

  3. Adjust the fetch and write settings accordingly, including a schema file if importing from CSV. Edited Import Config file

  4. To save the new or updated import config file, click on Save. Save Import Configs

Your import configs file will be saved at the specified location.

Below shows an example import config file:

Import Config Example

Data Export

Once all the schema and config files are saved the next step is to export the data from D365.

  1. Select Data Export from the ribbon and select format type of JSON or CSV.

  2. Select the location to save the data.

  3. If you have a saved export config from Export Config File, click Load to open this. Alternatively, adjust these settings now or leave the defaults.

  4. Select the Environment if different then verify the location of the schema file.

The Data Export page should look something like this: Run Export

  1. Select Run and the data will be exported to the specified location. You will also see a success message confirming that data export is complete:

Data Export Complete

The Data is now extracted into a JSON file which you can see an example of below: Data Export Output

In this example 3 Account records have been extracted with the attributes ‘Account Name’, ‘Email Address’ & ‘Account Number’

Data Import

To import the exported data into an environment, follow the instructions below

  1. Select Data Import from the ribbon and select format type of JSON or CSV.

  2. Select the location of the source data.

  3. If you have a saved import config from Import Config File, click Load to open this. Alternatively, adjust these settings now or leave the defaults.

  4. Select the Environment if different then select the location of the schema file (schema is only required for CSV).

The Data Import page should look something like this: Run Import

  1. Select Run and the data will be imported into D365. You will also see a success message confirming that data import is complete:

Data Import Complete

You will then be able to view your data in D365. Imported Accounts