|
1 | 1 | ---
|
2 |
| -title: Copy data in Dynamics (Microsoft Dataverse) |
| 2 | +title: Copy and transform data in Dynamics 365 (Microsoft Dataverse) or Dynamics CRM |
3 | 3 | titleSuffix: Azure Data Factory & Azure Synapse
|
4 |
| -description: Learn how to copy data from Microsoft Dynamics CRM or Microsoft Dynamics 365 (Microsoft Dataverse) to supported sink data stores or from supported source data stores to Dynamics CRM or Dynamics 365 by using a copy activity in an Azure Data Factory or Azure Synapse Analytics pipeline. |
| 4 | +description: Learn how to copy and transform data in Dynamics 365 (Microsoft Dataverse) or Dynamics CRM using Azure Data Factory or Azure Synapse Analytics. |
5 | 5 | ms.service: data-factory
|
6 | 6 | ms.subservice: data-movement
|
7 | 7 | ms.topic: conceptual
|
8 | 8 | ms.author: jianleishen
|
9 | 9 | author: jianleishen
|
10 | 10 | ms.custom: synapse
|
11 |
| -ms.date: 12/31/2021 |
| 11 | +ms.date: 01/10/2022 |
12 | 12 | ---
|
13 |
| -# Copy data from and to Dynamics 365 (Microsoft Dataverse) or Dynamics CRM |
| 13 | +# Copy and transform data in Dynamics 365 (Microsoft Dataverse) or Dynamics CRM using Azure Data Factory or Azure Synapse Analytics |
14 | 14 |
|
15 | 15 | [!INCLUDE[appliesto-adf-asa-md](includes/appliesto-adf-asa-md.md)]
|
16 |
| -This article outlines how to use a copy activity in Azure Data Factory or Synapse pipelines to copy data from and to Microsoft Dynamics 365 and Microsoft Dynamics CRM. It builds on the [copy activity overview](copy-activity-overview.md) article that presents a general overview of a copy activity. |
| 16 | +This article outlines how to use a copy activity in Azure Data Factory or Synapse pipelines to copy data from and to Dynamics 365 (Microsoft Dataverse) or Dynamics CRM, and use a data flow to transform data in Dynamics 365 (Microsoft Dataverse) or Dynamics CRM. To learn more, read the [Azure Data Factory](introduction.md) and the [Azure Synapse Analytics](..\synapse-analytics\overview-what-is.md) introduction articles. |
17 | 17 |
|
18 | 18 | ## Supported capabilities
|
19 | 19 |
|
20 | 20 | This connector is supported for the following activities:
|
21 | 21 |
|
22 | 22 | - [Copy activity](copy-activity-overview.md) with [supported source and sink matrix](copy-activity-overview.md)
|
| 23 | +- [Mapping data flow](concepts-data-flow-overview.md) |
23 | 24 | - [Lookup activity](control-flow-lookup-activity.md)
|
24 | 25 |
|
25 | 26 | You can copy data from Dynamics 365 (Microsoft Dataverse) or Dynamics CRM to any supported sink data store. You also can copy data from any supported source data store to Dynamics 365 (Microsoft Dataverse) or Dynamics CRM. For a list of data stores that a copy activity supports as sources and sinks, see the [Supported data stores](copy-activity-overview.md#supported-data-stores-and-formats) table.
|
@@ -501,6 +502,84 @@ If all of your source records map to the same target entity and your source data
|
501 | 502 |
|
502 | 503 | :::image type="content" source="./media/connector-dynamics-crm-office-365/connector-dynamics-add-entity-reference-column.png" alt-text="Dynamics lookup-field adding an entity-reference column":::
|
503 | 504 |
|
| 505 | +## Mapping data flow properties |
| 506 | + |
| 507 | +When transforming data in mapping data flow, you can read and write to tables from Dynamics. For more information, see the [source transformation](data-flow-source.md) and [sink transformation](data-flow-sink.md) in mapping data flows. You can choose to use a Dynamics dataset or an [inline dataset](data-flow-source.md#inline-datasets) as source and sink type. |
| 508 | + |
| 509 | +### Source transformation |
| 510 | + |
| 511 | +The below table lists the properties supported by Dynamics. You can edit these properties in the **Source options** tab. |
| 512 | + |
| 513 | +| Name | Description | Required | Allowed values | Data flow script property | |
| 514 | +| ---- | ----------- | -------- | -------------- | ---------------- | |
| 515 | +| Table | If you select Table as input, data flow fetches all the data from the table specified in the dataset. | No | - | tableName | |
| 516 | +| Query |FetchXML is a proprietary query language that is used in Dynamics online and on-premises. See the following example. To learn more, see [Build queries with FetchXML](/previous-versions/dynamicscrm-2016/developers-guide/gg328332(v=crm.8)). | No | String | query | |
| 517 | +| Entity | The logical name of the entity to retrieve. | Yes when use inline mode | - | entity| |
| 518 | + |
| 519 | +> [!Note] |
| 520 | +> If you select **Query** as input type, the column type from tables can not be retrieved. It will be treated as string by default. |
| 521 | +
|
| 522 | +#### Dynamics source script example |
| 523 | + |
| 524 | +When you use Dynamics as source type, the associated data flow script is: |
| 525 | + |
| 526 | +``` |
| 527 | +source( |
| 528 | + output( |
| 529 | + new_name as string, |
| 530 | + new_dataflowtestid as string |
| 531 | + ), |
| 532 | + store: 'dynamics', |
| 533 | + format: 'dynamicsformat', |
| 534 | + baseUrl: $baseUrl, |
| 535 | + cloudType:'AzurePublic', |
| 536 | + servicePrincipalId:$servicePrincipalId, |
| 537 | + servicePrincipalCredential:$servicePrincipalCredential, |
| 538 | + entity:'new_datalowtest' |
| 539 | +query:' <fetch mapping='logical' count='3 paging-cookie=''><entity name='new_dataflow_crud_test'><attribute name='new_name'/><attribute name='new_releasedate'/></entity></fetch> ' |
| 540 | + ) ~> movies |
| 541 | +
|
| 542 | +``` |
| 543 | + |
| 544 | +### Sink transformation |
| 545 | + |
| 546 | +The below table lists the properties supported by Dynamics sink. You can edit these properties in the **Sink options** tab. |
| 547 | + |
| 548 | +| Name | Description | Required | Allowed values | Data flow script property | |
| 549 | +| ---- | ----------- | -------- | -------------- | ---------------- | |
| 550 | +| Entity | The logical name of the entity to retrieve. | Yes when use inline mode | - | entity| |
| 551 | +| Request interval | The interval time between API requests in millisecond. | No | - | requestInterval| |
| 552 | +| Update method | Specify what operations are allowed on your database destination. The default is to only allow inserts.<br>To update, upsert, or delete rows, an [Alter row transformation](data-flow-alter-row.md) is required to tag rows for those actions. | Yes | `true` or `false` | insertable <br/>updateable<br/>upsertable<br>deletable| |
| 553 | +| Alternate key name | The alternate key name defined on your entity to do an update, upsert or delete. | No | - | alternateKeyName | |
| 554 | + |
| 555 | +#### Dynamics sink script example |
| 556 | + |
| 557 | +When you use Dynamics as sink type, the associated data flow script is: |
| 558 | + |
| 559 | +``` |
| 560 | +moviesAltered sink( |
| 561 | + input(new_name as string, |
| 562 | + new_id as string, |
| 563 | + new_releasedate as string |
| 564 | + ), |
| 565 | + store: 'dynamics', |
| 566 | + format: 'dynamicsformat', |
| 567 | + baseUrl: $baseUrl, |
| 568 | +
|
| 569 | + cloudType:'AzurePublic', |
| 570 | + servicePrincipalId:$servicePrincipalId, |
| 571 | + servicePrincipalCredential:$servicePrincipalCredential, |
| 572 | + updateable: true, |
| 573 | + upsertable: true, |
| 574 | + insertable: true, |
| 575 | + deletable:true, |
| 576 | + alternateKey:'new_testalternatekey', |
| 577 | + entity:'new_dataflow_crud_test', |
| 578 | +
|
| 579 | +requestInterval:1000 |
| 580 | + ) ~> movieDB |
| 581 | +``` |
| 582 | + |
504 | 583 | ## Lookup activity properties
|
505 | 584 |
|
506 | 585 | To learn details about the properties, see [Lookup activity](control-flow-lookup-activity.md).
|
|
0 commit comments