Questions tagged [azure-cosmosdb-mongoapi]

Azure Cosmos DB databases can be configured to use the MongoDB API. Via this feature Cosmos DB aims to provide a compatible server interface for applications using the MongoDB wire protocol. Since Cosmos DB is a distinct implementation from MongoDB server, some server commands may not be supported yet or may differ in behavior.

Documentation

437 questions
6
votes
2 answers

What version of MongoDB is used by Azure CosmosDB? How can I check the version?

I'm trying to figure out what version of MongoDB is used by CosmosDB? Tried checking out azure cosmosdb portal for more information but there is no specific version mentioned on it.
Dev3100
  • 83
  • 1
  • 9
5
votes
0 answers

Request Timed out on CosmoDB with Mongo API

I want to run a very simple mongo query (with Robo 3T as mongo client) on my cosmoDB instance with Mongo API. db.getCollection('events').aggregate( [ { $match: {customer: "printabled"}}, /*{ $count: "PEZZI_INC" }*/ { $group: { …
Tiziano
  • 51
  • 4
4
votes
2 answers

Cosmos DB: Retryable writes are not supported. Please disable retryable writes by specifying

There are loads of threads on this issue, none of which have solutions that work for me. I am using NestJS, TypeORM, and Cosmos DB Mongo API. I am running the NestJS service on my machine, hitting the Database in Azure. I can read from collections…
4
votes
0 answers

MongoDB: updateOne() duplicate key exception

I am trying to save a record in cosmos db using com.mongodb.client.MongoCollection.updateOne() with UPSERT flag "true". But I am getting duplicate key _id error and on retry the same object saves into db. I am unable to figure out the root cause of…
4
votes
4 answers

Importing to CosmosDB MongoDB API using mongorestore fails with retryable writes error

I'm trying to export and import data from an old MongoDB database server to Azure CosmosDB with MongoDB API using mongodump and mongorestore. But i'm having issues with the connection to CosmosDB. I'm using a connection string with the URI flag. My…
CMarker
  • 75
  • 8
4
votes
1 answer

Azure cosmosDB: Getting error on sorting with mongoDB api

I am using MongoDB API. if (req.query.sortBy) { var parts = req.query.sortBy.split(":"); sort[parts[0]] = parts[1] === "desc" ? -1 : 1; } try { // var tasks = await Task.find({owner:req.user._id}) // res.send(tasks) await…
theblue5.o
  • 45
  • 1
  • 5
4
votes
1 answer

Delete an item using DeleteItemAsync when PartitionKeyValue and id both values are same

I am trying to delete an item from CosmosDB collection. I am calling using ItemResponse response = await _deviceCapabilityContainerName.DeleteItemAsync(device.deviceId, new PartitionKey(device.deviceId)); I have seen posts doing…
nikhil
  • 75
  • 1
  • 10
4
votes
1 answer

Does Mongoose work with Cosmos DB with provisioned throughput?

Description: I have setup a new Cosmos DB Database with provisioned throughput.This is to share RU/s for all collections and minimizing cost. My API accessing Cosmos is a Node.JS with Express and Mongoose. The database is now setup with 1 collection…
Keb
  • 73
  • 1
  • 5
4
votes
1 answer

How to connect Azure Cosmos DB to MongoDB Compass

I am having trouble connecting my Azure CosmosDB to MongoDB Compass. I need clarification and assistance with the following settings: Authentication = username and password from connection string? Authentication Database = my CosmosDB…
4
votes
3 answers

CosmosDB DocumentDB-API vs CosmosDB MongoDB-API?

Since DocumentDB and MongoDB are both document-oriented DBs it seems that they can model the same type of data and both are well suited for to solve the same problems. Besides the different ecosystem, DocumentDB's lock-in to Azure, and…
Quang Van
  • 11,475
  • 12
  • 57
  • 61
3
votes
0 answers

Debezium MongoDB Connector fails with CosmosDB MongoDB API

I'm using Kafka Connect with Debezium MongoDB Connector to export some data from a CosmoDB (MongoDB API). My connector config is bellow: apiVersion: kafka.strimzi.io/v1beta2 kind: KafkaConnector metadata: name: ingest-ledger-small-collections …
3
votes
3 answers

Azure Cosmos MongoDB API with Azure Managed Identities

I have an App Service in Azure connects to Azure Cosmos Mongo API using Connection String. I am wondering if there is a way to use Managed Identity to connect to Mongo API instead of using Connection String. I know that it is doable for Cosmos SQL…
Inako
  • 259
  • 5
  • 13
3
votes
1 answer

System.FormatException: Element 'HoleId' does not match any field or property of class build.Models.Product

I am new to C#. I am trying to connect COSMOS DB in C# using MongoAPI web driver. I am following their documentation and trying to get data from my collection. In the documentation, they gave sample…
Smith Dwayne
  • 2,675
  • 8
  • 46
  • 75
3
votes
0 answers

Cosmos DB Mongo API | Intermittent high cost query | "find" using Mongo command getMore

I have a Cosmos DB query that is intermittently consuming very high amounts of RUs. In most cases, the Request Charge is around 1000 RUs, but in others it is as high as 80,000 RUs. I am using the Mongo API for Cosmos DB and using the Node.js Mongo…
mairf
  • 51
  • 5
3
votes
1 answer

How reliable is change stream support in Azure Cosmos DB’s API for MongoDB?

Description I am working on an ASP.NET Core 3.1 web application which needs to track/respond on changes made to the MongoDB database hosted by Azure Cosmos DB (version 3.6). For this purpose I am using the Change feed support. The changes are pretty…
1
2
3
29 30