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
3
votes
2 answers

Seed Data to Cosmos DB in Azure Devops

I have ARM template creating Cosmos DB, database and collections through pipeline. Since there are multiple applications using the database, I want to seed initial data for testing, I was looking for the Cosmos DB import tasks in devops and found…
3
votes
1 answer

Azure Cosmos DB Mongo - Resource tokens

I am investigating NoSQL Technologies for use in a project and Azure Cosmos Mongo API has arisen as an option. As part of Microsofts recommended architecture there is a Resource broker component middleware which retains ownership of the CosmosDB…
watdo
  • 667
  • 8
  • 22
3
votes
0 answers

RequestCharge too high

I want to delete items from a CosmosDB collection using a simple query filter: db.getCollection('RequestLog').remove({ "ApplicationId": { $eq: "myValue" } }) I get the following error: Request rate is large. More Request Units may be needed, so no…
Catalin
  • 11,503
  • 19
  • 74
  • 147
3
votes
1 answer

404 when trying to connect to Cosmos DB from Bot Framework 4.6

I am unsure if the format of my connections string is correct when I am trying to connect to Cosmos DB from Bot Framework 4.6: IStorage memoryStorage = null; // memoryStorage = new MemoryStorage(); memoryStorage = new…
3
votes
0 answers

Azure Cosmos DB: Update pipeline supported, or Cosmos-native way to emulate this?

We wanted to switch over from using MongoDB 4.2 to Cosmos DB, but realized that the thing preventing us to do so are Update (aggregation) Pipelines. MongoDB supports them, on Cosmos DB we get a weird looking error Expected type object but found…
Stefan
  • 141
  • 1
  • 5
3
votes
1 answer

Proper way to handle CosmosDb Mongo 429 error with Polly

I deploy an application on azure web apps who interract with a CosmosDB database using the mongoDb driver in .netCore 3. Following this documentation I have to set a retry policy in order to handle the 429 error code when the RU/s are not available.…
3
votes
3 answers

Azure Cosmos Mongo API version 3.2 to 3.6 upgrade

We have to upgrade Azure Cosmos Mongo API from version 3.2 to 3.6. Could anyone suggest steps to migrate all the Database and collections from 3.2 to 3.6?
Arul
  • 83
  • 8
3
votes
2 answers

Shard key and Azure CosmosDB for MongoDB API

I created a CosmosDB database that uses MongoDB's Python SDK, let's call the database as school and the collection as students. While creating the database, the Azure UI asked me to create a shard key for unlimited storage capacity, let's call it…
Akshay
  • 2,622
  • 1
  • 38
  • 71
3
votes
1 answer

Slow CosmosDB Mongodb Query

I'm using the MongoDB api to access a CosmosDb on Azure. I have a collection of a few thousand documents. They are shaped like this: { "_id" : ObjectId("5b4f574ac2100c890805a7d8"), "id" : 12, "name" : "Spotted Owl", "overview" :…
Darthg8r
  • 12,377
  • 15
  • 63
  • 100
3
votes
0 answers

CosmosDB API for Mongo Treats Multikey Unique Indexes Differently to MongoDB

I'm attempting to drop Azure CosmosDB into a project where MongoDB was originally used. I've hit an issue where by unique indexes are being treated differently across CosmosDB and MongoDB, and I can't find any docs that suggest I should see an…
Martin Peck
  • 11,440
  • 2
  • 42
  • 69
3
votes
1 answer

Cosmos DB findOneAndUpdate: Sort on multiple parameters fails with unexpected error

I've set up an Azure Cosmos DB that exposes the MongoDB API. I connect to the DB with the mongo shell. I create a new db sample with use sample. I create a simple collection sample with db.sample.insert({}) I then try to run the following…
Jacob Horbulyk
  • 2,366
  • 5
  • 22
  • 34
3
votes
0 answers

Strange RU/s usage when using Azure Cosmos DB (mongo interface from java)

We are using Azure cosmos DB and we are accessing it from Java using the mongo API Some simple queries that usually use about 4 RUs sometime take about 1500 RU's and we get the message "rate is too large" If we do the same query from the azure…
Maayan Hope
  • 1,482
  • 17
  • 32
3
votes
3 answers

How can I connect Azure Databricks to Cosmos DB using MongoDB API?

I have created one azure CosmosDB account using MongoDB API. I need to connect CosmosDB(MongoDB API) to Azure Databricks cluster in order to read and write data from cosmos. How to connect Azure Databricks cluster to CosmosDB account?
Chetan SP
  • 321
  • 1
  • 3
  • 15
3
votes
1 answer

azure cosmosDb "mongorestore" failes with "Request size is too large"

I try to migrate my mongoDb to azure´s cosmosdb. when I try to do the import as following mongorestore --host $host:10255 -u $user -p $password --ssl --sslAllowInvalidCertificates --batchSize 240 --drop --db chronas-api $folderPath I get this…
aumanjoa
  • 905
  • 1
  • 11
  • 30
2
votes
1 answer

Does Azure Cosmos DB for Mongo Support Materialized view

We have a usecase that needs On-Demand Materialized Views, that does automatic update in the view, so our analytics dashboard can be faster. This feature is available in Atlas Mongo, not sure it is available in Azure. Azure do provide materialized…
1 2
3
29 30