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

CosmosDB: How does SELECT TOP work?

I have a 450GB database... with millions of records. Here is an example query: SELECT TOP 1 * FROM c WHERE c.type='water'; To speed up our queries, I thought about just taking the first one but we have noticed that the query still takes quite a…
pookie
  • 3,796
  • 6
  • 49
  • 105
22
votes
2 answers

How to rename collection in document db?

How to rename database name or collections name in azure document Db? We have set of collections in our documentdb database. Is it possible to change the collection name for other purposes
vinoth
  • 305
  • 2
  • 9
22
votes
2 answers

How _ts change in DocumentDB

I have a question regarding the _ts field within the documentdb. How is it determined? My understanding is that when a document is added/altered it gets a new _ts. Are there any chance that two documents have the same _ts? If so, does it happen only…
HHH
  • 6,085
  • 20
  • 92
  • 164
21
votes
1 answer

DocumentDB: What's the point of "Upsert"?

I'm trying to understand this part of the API so I can update documents in the most efficient way possible. Given the following: "Replace" requires that a document already exists "Upsert" doesn't require that a document exists, but needs the…
Simon Ordo
  • 1,517
  • 2
  • 14
  • 23
21
votes
5 answers

DocumentDB ReplaceDocument Fails

In Azure DocumentDB using .NET SDK, I get the following error when calling ReplaceDocumentAsync: "Errors":["The input content is invalid because the required properties - 'id; ' - are missing","The request payload is invalid. Ensure to provide a…
Hossein
  • 1,090
  • 1
  • 8
  • 24
21
votes
4 answers

Converting created document result to POCO

I have the following code that calls DocumentDB and creates a new Employee document. How do I then convert the result to Employee document again? Basically, I want to capture the created document and convert it to Employee object. var result = await…
Sam
  • 26,817
  • 58
  • 206
  • 383
20
votes
2 answers

How can I use LINQ in CosmosDB SDK v3.0 async query?

I've been following the official documentation here: https://learn.microsoft.com/en-us/azure/cosmos-db/sql-api-get-started#Query But I can't figure out how to correctly use a LINQ expression instead on an SQL string. I experimented with…
Francesco Cristallo
  • 2,856
  • 5
  • 28
  • 57
20
votes
2 answers

CosmosDB Graph : "upsert" query pattern

I am new to Gremlin query language. I have to insert data on a Cosmos DB graph (using Gremlin.Net package), whether the Vertex (or Edge) already exists in the graph or not. If the data exists, I only need to update the properties. I wanted to use…
Rom Eh
  • 1,981
  • 1
  • 16
  • 33
20
votes
1 answer

How to debug Azure Cosmos DB Stored Procedures?

I am working with Azure Cosmos DB, I am programming the client side in C# (web service) and I'm writing some server side Stored Procedures with java-script. How can I debug my stored procedure's code? Thanks, MAK
MAK
  • 605
  • 9
  • 19
20
votes
3 answers

How to tell DocumentDB SDK to use camelCase during linq query?

Considering the document { "userName": "user1" } stored in the User collection, and the following User class: public class User { public string Id { get; set; } public string UserName { get; set; } } With the following JSON.net…
Jonas Stawski
  • 6,682
  • 6
  • 61
  • 106
20
votes
1 answer

Slow performance on Azure DocumentDB

I'm currently facing quite slow response times from Azure DocumentDB (first time trying it). There are 31 objects in a collection, which I am going to fetch and return to the caller. The code I am using is this: public async Task>…
Andre Andersen
  • 1,211
  • 1
  • 11
  • 19
20
votes
6 answers

How can I run Microsoft Azure DocumentDB locally?

I use a Mac and mostly work on Node.js projects. I would like to try out DocumentDB to compare it against MongoDB. Is there anyway to run a local instance of Azure DocumentDB without going thru the hassles of setting up a real account? Thanks!
Sunny Day
  • 523
  • 2
  • 8
  • 16
19
votes
3 answers

High demand on Azure Cosmos DB Emulator when adding a new collection

When I'm trying to add a new collection to database I'm getting this error : Failed to create collection 'Products'. Error: Sorry, we are currently experiencing high demand in this region, and cannot fulfill your request at this time. We work…
Nicu Besliu
  • 453
  • 5
  • 17
19
votes
1 answer

How can I store Images in Azure Cosmos DB?

I have PNG images which i want to store in cosmos db along with some metadata. What is the best way to store it ? I don't want to store in Azure blob storage separately, better to store with the data.
Ashish
  • 279
  • 1
  • 2
  • 11
19
votes
4 answers

What is the size limit of a cosmosdb item?

I've been looking for a authoritative source of azure cosmosdb limits by I can't find one. In particular, I need to know the size limits for a individual item.
Newbie
  • 7,031
  • 9
  • 60
  • 85