Questions tagged [azure-cosmosdb]

Azure Cosmos DB is Microsoft's fully managed and serverless distributed database with support for NoSQL and relational workloads. It offers global distribution across all Azure regions transparently replicating your data wherever your users are. Develop applications using open-source database engines, including PostgreSQL, MongoDB, and Cassandra. Get automatic scalability, enterprise-grade security, and cost-effective consumption-based pricing.

Azure Cosmos DB is a fully managed, distributed NoSQL and relational database for modern app development. Get single-digit millisecond response times and up to 99.999-percent availability, backed by SLAs. Build cloud-native apps quickly and easily using your preferred tools with support for open-source PostgreSQL, MongoDB and Apache Cassandra. Enjoy automatic and instant scalability, and fast writes and reads anywhere in the world with turnkey data replication and multi-region writes. Gain insight over real-time data with no-ETL analytics using Azure Synapse Link for Azure Cosmos DB.

7404 questions
13
votes
2 answers

Azure Cosmos DB Graph Wildcard search

Is it possible to search Vertex properties with a contains in Azure Cosmos Graph DB? For example, I would like to find all persons which have 'Jr' in their name? g.V().hasLabel('person').has('name',within('Jr')).values('name') Seems like the…
Stephane
  • 11,056
  • 9
  • 41
  • 51
13
votes
1 answer

CosmosDB Query Performance

I wrote my latest update, and then got the following error from Stack Overflow: "Body is limited to 30000 characters; you entered 38676." It's fair to say I have been very verbose in documenting my adventures, so I've rewritten what I have here to…
user310988
13
votes
1 answer

How to create a auto incremented column in Documentdb

I want to create a document in azure documentdb with an auto-increment column. Is this possible? If yes, please guide me. Any help would be greatly appreciated. Database db = CreateOrReadDocumentDb("EmployeeDb").Result; DocumentCollection dc =…
satish kumar V
  • 1,695
  • 6
  • 33
  • 47
12
votes
2 answers

Azure Cosmos DB Emulator Linux image does not start (Error: The evaluation period has expired.)

With the following image mcr.microsoft.com/cosmosdb/linux/azure-cosmos-emulator:latest when attempting to start a container either via: Docker Desktop (Windows) Or, via the following CLI command (Windows): docker run --name azure-cosmosdb-emulator…
Aaron Zhong
  • 921
  • 8
  • 22
12
votes
4 answers

How do I configure Cosmos DB .NET 3.0 SDK to serialize with camel case?

My .NET POCOs are in ProperCase. My json is in camelCase. How can I configure version 3.0 of the .NET SDK to convert when serializing/deserializing to/from Cosmos DB? I know I can add the attribute [JsonProperty(PropertyName = "myProperty")] to…
user1843640
  • 3,613
  • 3
  • 31
  • 44
12
votes
2 answers

Would using a substring of a GUID in CosmosDB as partitionkey be a bad idea?

I'm doing some R&D to move a product catalog into CosmosDB. In it's simplest terms a Product document will have: Product Id (GUID) Product Name Manufacturer A manufacturer will log into this system and will only be able to query their own data…
Eoin Campbell
  • 43,500
  • 17
  • 101
  • 157
12
votes
2 answers

Connection to CosmosDB through Mongo API fails after idle

We have a Scala server which uses the Java MongoDB driver as wrapped by Casbah. Recently, we switched its database over from an actual MongoDB to Azure CosmosDB, using the Mongo API. This is generally working fine, however every once in a while a…
12
votes
2 answers

Multiple consumers of Cosmos DB Change Feed

I'm using Change Feed Processor library (or Azure Functions Cosmos DB trigger) to subscribe to collection updates. How do I set up multiple independent (non-competing) consumers to the feed of the same collection? One way is to use multiple lease…
Mikhail Shilkov
  • 34,128
  • 3
  • 68
  • 107
12
votes
3 answers

Update Azure Cosmos db partition key to re-distribute existing data (document db)

Currently, my data is in azure cosmos db (DocumentDB) with wrong or un-optimized partition key. Now I want to update partition key and re distribute my data but not able to figure it out. How can I do it?
Nikunj Aggarwal
  • 296
  • 5
  • 15
12
votes
1 answer

WHERE IN with Azure DocumentDB (CosmosDB) .Net SDK

Having seen this question I'm not sure why the following code for my DocDb instance isn't working: var userApps = _docs.CreateDocumentQuery(UriFactory.CreateDocumentCollectionUri(Constants.Databases.Applications.ID,…
bc3tech
  • 1,228
  • 14
  • 27
12
votes
1 answer

How to solve MongoError: pool destroyed while connecting to CosmosDB

I have Node.js service in which I am using mongo-API to communicate with Document/Cosmos DB. My service run's fine and performs all the crud operation but after 1 min some mongo error throws from the…
Anand Deshmukh
  • 1,086
  • 2
  • 17
  • 35
12
votes
1 answer

Storing different document types in one DocumentDb collection

We have a multitenant application that uses Azure DocumentDB as our NoSQL document oriented database. For multitenancy, we read this question and this blog post. Because right now our number of users do not meet the need to use different databases…
Benoit Patra
  • 4,355
  • 5
  • 30
  • 53
12
votes
4 answers

DocumentDB SQL with ARRAY_CONTAINS

I'm playing around on https://www.documentdb.com/sql/demo, which allows me to query against sample documents that look like: { "id": "19015", "description": "Snacks, granola bars, hard, plain", "tags": [ { "name": "snacks" } …
core
  • 32,451
  • 45
  • 138
  • 193
12
votes
1 answer

Updating part of a Document in Azure DocumentDB

Is there a way to update part of a document in a DocumentDB collection? I know that ReplaceDocumentAsync lets you update a document, but you have to replace the entire document. This sounds kind of scary. If I have an object that has other objects…
Kevin Cress
  • 248
  • 4
  • 15
11
votes
0 answers

408 status code from Cosmos DB using SDK v3

I have an API (.NET Core 2.2) which retrieves documents from Cosmos DB using SDK v3.5.0. Currently some requests are throwing an exception due to timeouts on requests to Cosmos DB - the response is 408 status code. It's worth mentioning that the 90%…
Juanjo
  • 111
  • 1
  • 4