# One-to-Many Data Migration

appRules features an unmatched number of options for migrating, replicating and synchronizing data.&#x20;

## Product & Hosting Options

#### Platform Product Availability

The workflow activities and other modules used in this sample project are available in the following appRules Platform products:

<table><thead><tr><th width="374"> Platform Product</th><th>Availability</th></tr></thead><tbody><tr><td>appRules Data Migration Engine</td><td><img src="https://1923141441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFjmFrZ8sef1J7qkr6H%2Fuploads%2FbZcAZuTcLW9DTTX2Y0n1%2Fimage.png?alt=media&#x26;token=612e0de2-56f8-4c29-8fcc-b96886efccfe" alt=""></td></tr><tr><td>appRules Integration &#x26; Automation Engine</td><td><img src="https://1923141441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFjmFrZ8sef1J7qkr6H%2Fuploads%2FWqBTZIpwFI86fU008Gin%2F2022-10-05_15-56-34.jpg?alt=media&#x26;token=6d923ac2-f0ed-4715-bd43-a98dc3dbe6c0" alt=""></td></tr><tr><td>appRules Enterprise 360</td><td><img src="https://1923141441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFjmFrZ8sef1J7qkr6H%2Fuploads%2FbYAbg5056fkAJrta4voJ%2Fimage.png?alt=media&#x26;token=121aa2c3-4a84-4748-b370-cc73ff6e8f07" alt=""></td></tr></tbody></table>

#### Hosting & Execution Environment&#x20;

If you are running the On-Premise, Azure Marketplace or AWS Marketplace editions, the following hosting options supported by appRules are recommended for running this sample project:

| Hosting Option        | Recommended for Project                                                                                                                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| IIS                   | ![](https://1923141441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFjmFrZ8sef1J7qkr6H%2Fuploads%2FQGuJStnndRXh9p477KCi%2Fimage.png?alt=media\&token=9e62c85b-8107-4880-8911-60a7f11985f8) |
| appRules Host Service | ![](https://1923141441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFjmFrZ8sef1J7qkr6H%2Fuploads%2Fg7FiSjSFDMM4rb9C79m9%2Fimage.png?alt=media\&token=688d46b8-261f-4de0-9db7-0a0fbc5e8016) |
| appRules Desktop      | ![](https://1923141441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFjmFrZ8sef1J7qkr6H%2Fuploads%2FwTC2SCA3rCAir6iDKmSs%2Fimage.png?alt=media\&token=41a6319f-25da-4373-b45e-9f5418a67fd4) |

{% hint style="info" %}
Since the appRules Host Service is automatically installed and ready to go, it is recommended that you use it for evaluating this sample project.  Just point your browser to the appRules URL
{% endhint %}

&#x20;

{% hint style="info" %}
The completed project is available in the appRules **Samples** project database. Click the "Open" toolbar button on the appRules home page to select the "Replicate Dynamics365 In Snowflake" project.
{% endhint %}

The One-to-Many Data Migration sample project demonstrates how to use the appRules MigrateData activity to perform One-to-Many data migrations.

In the sample project, a single activity is configured to load the Customers table from the SQL Database into the Account and Contact tables in Salesforce.

{% hint style="info" %}
The process is the same not only for Salesforce but for other data sources, such as Dynamics365, Snowflake, etc. and does not require any code or scripts.&#x20;
{% endhint %}

{% hint style="warning" %}
You will need to use your own credentials to access Salesforce to run this project.
{% endhint %}

**Drag the MigrateData activity from the Migrate-Replicate-Synchronize module of the toolbox on to the designer and configure it as follows:**

Select the default Source, Data Migration Type, and default Target:

Configure the Source Entity, the Primary Target Entity, and Secondary Target Entities:

<figure><img src="https://1923141441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFjmFrZ8sef1J7qkr6H%2Fuploads%2Fre3f6Y4ghotcfBngvtnl%2Fimage.png?alt=media&#x26;token=d6b74729-84bd-45b6-908f-17f63760936c" alt=""><figcaption></figcaption></figure>

<figure><img src="https://1923141441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFjmFrZ8sef1J7qkr6H%2Fuploads%2FDIhSfT8iFVjEsex3on9F%2Fimage.png?alt=media&#x26;token=d7917134-b562-4a0c-bdf4-2bc9d4fc0a71" alt=""><figcaption></figcaption></figure>

Complete the configuration of the Target Entities to suit your needs including mapping, etc:

<figure><img src="https://1923141441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFjmFrZ8sef1J7qkr6H%2Fuploads%2FzZW2JE9n4uovUjczp09C%2Fimage.png?alt=media&#x26;token=ff487621-6662-4215-85a3-d583dd7a3e61" alt=""><figcaption></figcaption></figure>

Notice the entries in the SecondaryEntities collection.  Configure to suit your needs - mapping etc:

<figure><img src="https://1923141441-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MFjmFrZ8sef1J7qkr6H%2Fuploads%2F7z8Idk2ZV2L6X1GTkYoc%2Fimage.png?alt=media&#x26;token=a41bc326-25d7-457e-b1d9-98fd066d28ce" alt=""><figcaption></figcaption></figure>

After running the project, you can view the Project Details and Audit Logs records and statistics.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.appstrategy.com/apprules-r-documentation/samples/sample-projects/data-migration-replication-and-synchronization/one-to-many-data-migration.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
