question

BanajiGurumohan-1701 avatar image
0 Votes"
BanajiGurumohan-1701 asked ·

Azure Data Factory - Copy activity from ADLS to Cosmos Mongo DB


Hi,
While running an Azure Data factory pipeline which copies data from AZure ADLS Gen storage 1 location to Azure Cosmos Mongo DB, I am receiving the below exception.

Request to please help with regards to resolution.

Thanks,
Guru

EXCEPTION :

 Operation on target factories_to_cosmos failed: ErrorCode=UserErrorDocumentDBWriteError,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Documents failed to import. Error message:Message: {"Errors":["The MAC signature found in the HTTP request is not the same as the computed signature. Server used following string to sign - 'post\nsprocs\ndbs\/bnlwe-gs-q-57322-uni-mongodb-01\/colls\/factories\/sprocs\/__.sys.commonBulkInsert\nfri, 22 may 2020 15:44:28 gmt\n\n'"]}
 ActivityId: a75ac86f-1e46-4dba-99fd-2118c31b7a9d, Request URI: /apps/d060e46a-6fa1-445e-86fe-347c0cf24dcc/services/7efbd4b1-8cf9-44f3-86aa-cdd176bff64e/partitions/c9bc0638-65fe-40d6-8b4a-1b67dc07a5d6/replicas/132299327739921058p/, RequestStats: 
 RequestStartTime: 2020-05-22T15:44:28.3746605Z, RequestEndTime: 2020-05-22T15:44:28.7184110Z, Number of regions attempted: 1
 ResponseTime: 2020-05-22T15:44:28.7184110Z, StoreResult: StorePhysicalAddress: rntbd://cdb-ms-prod-westeurope1-fd5.documents.azure.com:14320/apps/d060e46a-6fa1-445e-86fe-347c0cf24dcc/services/7efbd4b1-8cf9-44f3-86aa-cdd176bff64e/partitions/c9bc0638-65fe-40d6-8b4a-1b67dc07a5d6/replicas/132299327739921058p/, LSN: 1125, GlobalCommittedLsn: 1125, PartitionKeyRangeId: , IsValid: True, StatusCode: 401, SubStatusCode: 0, RequestCharge: 0, ItemLSN: -1, SessionToken: -1#1125, UsingLocalLSN: False, TransportException: null, ResourceType: StoredProcedure, OperationType: ExecuteJavaScript
 AddressResolution - StartTime: 2020-05-22T15:44:28.5153254Z, EndTime: 2020-05-22T15:44:28.5309103Z, TargetEndpoint: https://bnlwe-gs-q-57322-uni-cosmosdb01-westeurope.documents.azure.com//addresses/?$resolveFor=dbs%2fcYdDAA%3d%3d%2fcolls%2fcYdDAOj-AXw%3d%2fdocs&$filter=protocol eq rntbd&$partitionKeyRangeIds=0
 , SDK: documentdb-dotnet-sdk/2.5.1 Host/64-bit 
azure-data-factory
· 1
10 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Can you provide details with regard to the MongoDB API configuration and the URI you have configured in ADF?

API version: 3.2 or 3.6?

Note that when using Azure Cosmos DB's API for MongoDB accounts, the 3.6 version of accounts have the endpoint in the format .mongo.cosmos.azure.com whereas the 3.2 version of accounts have the endpoint in the format .documents.azure.com.


In the Azure Data Factory documentation (Linked Service Properties) the connectionString detail indicates the following for connection string:

mongodb://<cosmosdb-name>:<password>@<cosmosdb-name>.documents.azure.com:10255/?ssl=true&replicaSet=globaldb.

If you are using MongoDB API version 3.6, the endpoint should be *.mongo.cosmos.azure.com.


0 Votes 0 ·

0 Answers