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
2
votes
1 answer

Copy Data from MySQL (on-premises) to Cosmos DB

I have several questions as follows: I was wondering how I could transfer data from MySQL to Cosmos DB using either Python or Data Azure Factory, or anything else. If I understand correctly, a row from the table will be transformed into a document,…
N. Arunoprayoch
  • 922
  • 12
  • 20
2
votes
2 answers

Should null elements be stored in Cosmos DB or should they be ignored?

Is there a good reason to serialize null elements in a Cosmos DB document or is it better to ignore them? With the is_defined function I can query for undefined elements similar to how I query for null elements. Does either consume less RUs? In my…
Eli Pulsifer
  • 713
  • 9
  • 25
2
votes
1 answer

Integration of CosmosDB with Azure fuction and SignalR

i am working on the sample example provided by microsoft in the link below https://anthonychu.ca/post/cosmosdb-real-time-azure-functions-signalr-service/ I have followed all the steps by i am getting the error below while running the code with azure…
SandeshR
  • 203
  • 2
  • 11
2
votes
1 answer

GremlinClient management

What is the Best Practice for managing the GremlinClient object in C#? Is it better to create a SingleInstance (via Dependency Injection) or using Dispose on the object after each call or with a using using (var client = new GremlinClient(...)) { …
David Torres
  • 165
  • 9
2
votes
1 answer

GET vs Query on Partition Key and Item Key in Cosmos DB

I was reading the Cosmos DB docs on best practices for query performance, and I found the following ambiguous: With Azure Cosmos DB, typically queries perform in the following order from fastest/most efficient to slower/less efficient. GET on a…
Loren Paulsen
  • 8,960
  • 1
  • 28
  • 38
2
votes
2 answers

How to create a collection in a shared throughput cosmosdb using the Mongo API

I have an Azure CosmosDb database with database-level throughput provisioned. We're using the MongoDB API against this Cosmos instance. The shared throughput model requires all collections to have a partition key specified, which seems to prevent…
Dusty
  • 3,946
  • 2
  • 27
  • 41
2
votes
1 answer

CosmosDB, very long index that's also the partition key

We are storing a folder tree, the number of items is huge so we have created a partition on the parent folder. When we issue queries such as SELECT * FROM root WHERE root.parentPath = "\\server\share\shortpath" AND root.isFile The RUs is very low…
Steve Drake
  • 1,968
  • 2
  • 19
  • 41
2
votes
2 answers

Azure CosmosDB: Can One Set RBAC per Database/Collection

Given an Azure CosmosDB DB instance that is created from the Azure portal, it is possible to create multiple databases from a shell connection with the following commands: use someNewDbName; db.someNewCollectionName.insert({}); With other DB…
Jacob Horbulyk
  • 2,366
  • 5
  • 22
  • 34
2
votes
2 answers

What units does ST_DISTANCE return?

In Cosmos DB, what is the units for the value returned by the ST_DISTANCE function? The docs are unhelpful in this regard: Returns the distance between the two GeoJSON Point, Polygon, or LineString expressions.
me--
  • 1,978
  • 1
  • 22
  • 42
2
votes
1 answer

CosmosDB Mongo API: select specific fields

I'm using Azure CosmosDB Data explorer (Azure Portal -> Azure Cosmos DB -> Data Explorer). There're only JSON query string {"foo": "bar"}. How can I select only specific field or use aggregate command there? e.g., document structure: { "age": 30, …
lagrange-
  • 215
  • 1
  • 2
  • 9
2
votes
1 answer

Cosmos db sql; partition key on feed options vs querying on the partition key?

What is the difference between giving partition key in the .net core sdk FeedOptions vs having it as a criteria on the query? For example if you want to list all items within a given partition key. Should you go with feed options or partition key in…
Oddleif
  • 751
  • 3
  • 9
  • 35
2
votes
1 answer

Can I check for uniqueness and write a document in a Cosmos DB stored procedure

I have a Cosmos DB stored procedure that creates a new document if it doesn't already exist and returns the existing or the new document. The procedure may be called from different processes. Can I be sure that the document is only created once even…
Hein Gustavsen
  • 395
  • 3
  • 15
2
votes
1 answer

Getting single gremlin result from multiple paths

Having trouble coming up with a good single query to get the results I'm looking for. In this scenario I have reports, stores, and organizations. Reports can only ever belong to one store, or one org. Never both. Stores always belong to an org, and…
Steve Eggering
  • 759
  • 2
  • 9
  • 23
2
votes
2 answers

How to call CosmosDBTrigger and HttpResponseMessage for Azure SignalR in .Net Core MVC?

I have a .Net Core Web MVC Application and I want to send a notification to a client with Azure SignalR, when in CosmosDB the change feed is triggered. FeedToSignalR trigger on new data in CosmosDB and broadcast it through SignalR to a…
dev4678
  • 121
  • 4
2
votes
2 answers

Azure Cosmos MongoDB - Create collection with shard key

I need to create a collection in Azure's Cosmos MongoDB but with a partition/shard key as the required configuration is that the database will have a provisioned throughput (a set amount of RU's) and the collections in it will have a shared…
Tomer Something
  • 770
  • 1
  • 10
  • 24