locked
Copy Data - Dynamic Mapping is throwing exception -UserErrorMissingValidKey RRS feed

  • Question

  • I'm trying to upsert records into CRM from Blob .csv file. In Copy data i'm using Dynamic Mapping as like below. 

    While running the pipeline, i'm getting below exception, If i use explicitly declare Mappings, it's working fine. This is really wierd! Need some suggestions here.

    { "errorCode": "2200", "message": "Failure happened on 'Sink' side. ErrorCode=UserErrorMissingValidKey,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=,Source=,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The primary key attribute 'kom_servicenewsid' must be of type guid.,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,''Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The primary key attribute 'kom_servicenewsid' must be of type guid.,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,'", "failureType": "UserError", "target": "cdServiceNewsCounterFields_CRM", "details": [] }

    Thanks!


    Santhosh Kumar K

    Friday, April 3, 2020 11:26 AM

All replies

  • Hello Santhosh Kumar K and thank you for bringing this to our attention.

    This really IS weird.  Before I attempt to repro, there is one little thing I'd like you to try.

    I see in the picture:

    { "name": "Kom_servicenewsid", "type": "Guid"}

    while in the error,

    'kom_servicenewsid' must be of type guid

    I find, case sensitivity appears in the most unexpected of places. Can you try making the "Guid" -> "guid" please?

    Friday, April 3, 2020 5:28 PM
  • Hello Martin, I tried changing Guid to guid, still same error, this is really an odd issue.

    { "errorCode": "2200", "message": "Failure happened on 'Sink' side. ErrorCode=UserErrorMissingValidKey,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=The primary key attribute 'kom_servicenewsid' must be of type guid.,Source=Microsoft.DataTransfer.ClientLibrary.DynamicsPlugin,'", "failureType": "UserError", "target": "cdServiceNewsCounterFields_CRM", "details": [] }


    Santhosh Kumar K


    Saturday, April 4, 2020 2:10 AM
  • Hello Martin/Team,

    Can someone help me on this issue?

    Thanks


    Santhosh Kumar K

    Sunday, April 12, 2020 8:20 AM
  • Hello Santhosh , I just got word back from someone who worked on a very very similar case.

    In that person's case, they were reading from blob, and writing to CRM like you.  It happened that in the source blob, the field being used for primary key, was interpreted as type string in data factory.  In the sink CRM field it was correctly typed as GUID.  When they went and changed the type mapping for the source from string to GUID, their problem was solved.

    In the image you provided, I see you already have the mapping as GUID -> GUID.

    Can you go take a look at the blob source dataset schema?  Or share the source dataset JSON with me?

    Monday, April 13, 2020 7:59 PM
  • Hello Martin,

    I re-checked my source dataset schema, the field type is GUID only not of String type. Still getting the same error. I think we need deeper investigation for this issue.

    Thanks


    Santhosh Kumar K

    Thursday, April 16, 2020 9:25 AM
  • For a deeper investigation and immediate assistance on this issue, if you have a support plan you may file a support ticket, else could you please send an email to azcommunity@microsoft.com with the below details, so that we can create a one-time-free support ticket for you to work closely on this matter. 
    Thread URL:
    Subscription ID: 
    Subject : Attn MartinJaffer-MSFT
    Please let me know once you have sent the email or submitted a ticket.
    Friday, April 17, 2020 8:12 PM