adf- copying data from json file to cosmos db container

Sharma, Yukti 1 Reputation point
2021-10-21T10:15:53.397+00:00

Hi,
I am getting below error while trying to copy data from json file to cosmos db.
Please can you help resolve.

Error code -2200

Failure type -User configuration issue
Details :
ErrorCode=UserErrorDocumentDBWriteError,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Documents failed to import. Error message:Message: {"Errors":["Conflicting request to resource has been attempted. Retry to avoid conflicts."]}

Azure Cosmos DB
Azure Cosmos DB
An Azure NoSQL database service for app development.
1,726 questions
Azure Data Factory
Azure Data Factory
An Azure service for ingesting, preparing, and transforming data at scale.
11,119 questions
{count} votes

2 answers

Sort by: Most helpful
  1. HimanshuSinha-msft 19,476 Reputation points Microsoft Employee
    2021-10-22T21:38:05.467+00:00

    Hello @Anonymous ,
    Thanks for the ask and using Microsoft Q&A platform .
    Since you are writing the content from JSON to COSMOSDB , I am sure that you are setting up the partition key on the COSMOSDB . From the error it appears that you are trying to add a row partition key which already exists . Can you please check and let us know . In case you are the issue is not resolved , please share the JSON content ( with dummy data ( and COSMOSDB seeting .

    Please do let me know how it goes .
    Thanks
    Himanshu

    -------------------------------------------------------------------------------------------------------------------------

    • Please don't forget to click on 130616-image.png or upvote 130671-image.png button whenever the information provided helps you. Original posters help the community find answers faster by identifying the correct answer. Here is how
    • Want a reminder to come back and check responses? Here is how to subscribe to a notification
    • If you are interested in joining the VM program and help shape the future of Q&A: Here is how you can be part of Q&A Volunteer Moderators
    1 person found this answer helpful.
    0 comments No comments

  2. Sharma, Yukti 1 Reputation point
    2021-10-25T15:59:06.78+00:00

    Hi Himanshu,
    Thanks for taking up my query.
    For cosmos db partition key is on /SKUNumber.

    Attached is the error and sample json file please.

    Thanks and regards
    yukti

    143542-jsonsamplefile.txt
    143429-errorlog.txt

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.