ADF v2: Define keys for upsert behavior

Alejandro Valdez 21 Reputation points
2020-06-16T13:39:12.743+00:00

Hi, I'm trying to create a copy activity that copies from SQL to Dynamics CRM. I'm using the ADF v2 default connector. The Dynamics connectors as a sink have the upsert behavior but I don't know how to define the keys for comparing in the upsert. If I complete the configuration and the mapping, removing the unnecessary columns and I run the activity, I have the following error: Input DataSet must contain key column(s) in Upsert/Update scenario. Missing key column(s): Is there any way to set the keys in the input dataset?
The Alternate Key Name drop-down is always empty, and if I try to define the value manually I get the error: Failure happened on 'Sink' side. 'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Cannot retrieve key information of alternate key 'emailaddress1' for entity 'contact'.,

Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
9,827 questions
0 comments No comments
{count} votes

Accepted answer
  1. ChiragMishra-MSFT 956 Reputation points
    2020-06-17T05:53:50.233+00:00

    Hi @Alejandro Valdez ,

    You need to first define an altternate key on the dynamics side for upsert behaviour. Please have a look at this doc to learn how to do so :

    Define alternate keys for an entity

    Once you have defined an alternate key, it should appear in the Alternate key name drop down.

    Hope this helps.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful