question

CORONADOGRANADOSDianaMilena-8538 avatar image
0 Votes"
CORONADOGRANADOSDianaMilena-8538 asked alexdrenea answered

Key vault Azure data factory problem

Hello
I've created a Key vault service to store a secret with the credentials to access to my cosmos DB collection.
the secret value is as i show you :
AccountEndpoint=https://z-xxx-xxx-xx-dva-ew1-cdb01.documents.azure.com:443/;AccountKey=xxxxxxxxxxxxxxxxxxxxxxxxxxxx==;

The linked service and the test connection goes well.
{
"name": "ICVC_Cosmos_Home",
"properties": {
"description": "conexion directa mediante credenciales",
"annotations": [],
"type": "CosmosDb",
"typeProperties": {
"connectionString": {
"type": "AzureKeyVaultSecret",
"store": {
"referenceName": "Key_vault_Data_Factory",
"type": "LinkedServiceReference"
},
"secretName": "KV-Cosmos-Home"
}
}
},
"type": "Microsoft.DataFactory/factories/linkedservices"
}

however when I trigeer the pipeline, I'm getting this mistake, could you help me? it's something about the key vault service because if I configured the linked service with the credentials in clear text, tyhe issue doesn't happen

{
"errorCode": "2200",
"message": "ErrorCode=CosmosDbDatabaseNameMissing,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=Valid Database name should be provided.,Source=Microsoft.DataTransfer.ClientLibrary.DocumentDb,'",
"failureType": "UserError",
"target": "Load_Home_Cosmos",
"details": []
}

azure-data-factoryazure-cosmos-dbazure-key-vault
5 |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.

1 Answer

alexdrenea avatar image
0 Votes"
alexdrenea answered

You are missing your Database from the connection String:



 {
     "name": "CosmosConnection",
     "type": "Microsoft.DataFactory/factories/linkedservices",
     "properties": {
         "annotations": [],
         "type": "CosmosDb",
         "typeProperties": {
             "connectionString": "AccountEndpoint=https://xxxx-xxxx-xxxx-xxxx.documents.azure.com:443/;Database=core",
             "accountKey": {
                 "type": "AzureKeyVaultSecret",
                 "store": {
                     "referenceName": "MainKeyVault",
                     "type": "LinkedServiceReference"
                 },
                 "secretName": "CosmosAccessKey"
             }
         }
     }
 }


5 |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.