Questions tagged [azure-cosmosdb]

Azure Cosmos DB is a globally distributed database service designed to enable users to elastically and independently scale throughput and storage across any number of geographical regions with a comprehensive SLA. You can develop document, key/value, or graph databases with Cosmos DB using a series ...

0
votes
0answers
4 views

Return data from PreTrigger on CreateDocument in DocumentDb

I create document using C# api with a PreTriggerInclude: var doc = new MyDocument { Title ="My Document 1", //OrderNumber - calculated by PreTrigger }; var result = await client....
0
votes
2answers
26 views

Partitions vs RUs

Scenario: We have around 800,000 Users using our system. We need to store 5-6KB reports every 2 weeks for each user. There are only a handful of users (50-100) using the system at any one time which ...
0
votes
0answers
15 views

Configuration Cosmos DB, Bulk Insert Library in Data Factory v2

According to the documentation, the data factory v2 connector for cosmos db uses the bulk executor library. Data Factory's copy activity has the parameters "Data integration unit", "Degree of copy ...
0
votes
0answers
19 views

CosmosDB cross partition query error on a singular partition

I've just deleted two collections and then remade them to appear exactly the same as they did before, but without the documents contained within. The purpose of that was a quick and easy way of ...
1
vote
1answer
27 views

DocumentClient not working after deploying to Azure

I am working on a POC (in .Net Core) to write some data to local Cosmos DB emulator using Azure DocumentClient. private string _endpointUri = String.Empty; private string _primaryKey = String.Empty; ...
0
votes
1answer
19 views

Property reference is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause

Azure Cosmos Document DB throws an error on executing a query like this - SELECT DISTINCT VALUE { DocumentName: c.Name, Count: COUNT(c.id), Target: c.Target } FROM c where c.Target != ...
0
votes
1answer
13 views

Count of distinct doesnot work with cosmosdb

The below distinct query now works: SELECT DISTINCT c.name FROM c but the below query is not working, is there something done wrong here? SELECT COUNT(DISTINCT c.name) FROM c Failed to query ...
1
vote
1answer
27 views

Calculate the average RU/s by looking at the CosmosDB Metric Logs

I am trying to calculate the average of RU/s by looking at the CosmosDB Metric Logs. AzureMetrics | where MetricName =="TotalRequestUnits" I cannot make sense of the following properties in ...
1
vote
1answer
20 views

cosmosdb sql api vs mongodb api which one to use for my scenario.

I have a document called "chat" "Chat": [ { "User": {}, "Message": "i have a question", "Time": "06:55 PM" }, { "User": {}, "...
0
votes
1answer
11 views

Azure CosmosDB Emulator on Docker doesn't generate certificate

I'm trying to run the Azure CosmosDB Emulator in a Docker container as according to these instructions: https://docs.microsoft.com/en-us/azure/cosmos-db/local-emulator#running-on-docker The main ...
-2
votes
0answers
15 views

Cosmos DB “Multi-Master” and availability in china?

Does anyone know if the "multi-master" feature is also general available in china? See: https://azure.microsoft.com/en-us/updates/cosmos-db-multi-master-support-now-generally-available/
0
votes
1answer
38 views

How to limit usage of cosmos Database in Azure services?

I am beginner in using Microsoft Azure services and I have a student subscription which provides free services for 12 months . I am not able to figure out what this means and how to limit the usage ...
0
votes
1answer
33 views

Azure search service index pointing multiple document db collections

How to load data from two separate collections of azure cosmos db to a single azure search index? I need a solution to join the data from two collections in a way similar to inner joining concept of ...
0
votes
1answer
43 views

Azure / Cosmos DB is counting requests (RUs) I didn't make

I'm working on a simple Xamarin app, that needs to connect to and validate login information against a Cosmos DB collection of users. My app has had two requests, but the activity in Azure portal is ...
2
votes
0answers
59 views

CosmosDB Sql Query does not return same output in CosmosDB Emulator and Azure Portal Cosmos DB

I'm trying to execute an order by query in CosmosDB. but I'm getting a different result in CosmosDB Emulator and Azure Portal CosmosDB data explorer. in CosmosDB Emulator the query works fine and ...
-2
votes
0answers
12 views

Azure Cosmos Database Replacing Oracle RDBMS [closed]

Is it recommended to convert from RDBMS to Cosmos to resolve performance issues? What are the pros and cons especially for a database currently used to manage financial data? I know it is of high ...
0
votes
1answer
18 views

Is user data encryption required with CosmosDB?

I have private user data stored in CosmosDB, which has encryption at rest. Does this mean I still need to store encrypted data or is it already encrypted by Cosmos? If not, what is the recommened npm ...
0
votes
1answer
39 views

How to properly provision database and collection in deployment pipeline?

Bit longer question ahead but please bear with me: A CosmosDB PM explains in this feedback thread: In Cosmos DB, all of the resources e.g. databases, collections/tables/graphs, users, permissions, ...
1
vote
1answer
23 views

Unable to query by Timestamp in CosmosDB with Table API

I'm creating a query to include Cosmos entities from the last 30 days: var filter = TableQuery.GenerateFilterConditionForDate( "Timestamp", QueryComparisons....
0
votes
1answer
23 views

CosmosDB SQL to query “any” child field

Given a document structure like below, where "variants" has N id based sub-entries, I would like to filter on the inner "sku" field. Something akin to this: SELECT * FROM c WHERE c.variants.?.sku ="...
1
vote
1answer
16 views

What is the MongoDb connection string required for Azure CosmosDb Emulator Task in Build Pipeline?

I am trying to use the new Azure CosmosDB Emulator Task (https://docs.microsoft.com/en-us/azure/cosmos-db/tutorial-setup-ci-cd). We are relying on the Azure CosmosDb support for MongoDb and I can't ...
3
votes
1answer
49 views

Azure API Management - Cosmos DB

I am trying to build a proxy API Management and add this policy. I am getting always a HTTP/1.1 401 Unauthorized <policies> <inbound> <base /> <set-variable ...
1
vote
1answer
53 views

How to reliably store event to Azure CosmosDB and dispatch to Event Grid exactly once

I'm experimenting with event sourcing / cqrs pattern using serverless architecture in Azure. I've chosen Cosmos DB document database for Event Store and Azure Event Grid for dispachting events to ...
2
votes
1answer
46 views

cosmosdb emulator not giving any results

I have no idea why this happening while querying the cosmos database it won't show any document not even for the SELECT * FROM c but the RU's is shown. but it works fine with the Documents tab in ...
1
vote
0answers
26 views

Exporting some tables from Azure SQL to Cosmos DB for PowerBI visualization

I have a situation where most of my organization's data sits at Azure SQL. Now we are including one more data source which gives 1GB of structured data daily. My objective is that I have to merge this ...
1
vote
1answer
27 views

How to provide partition key with Azure Stored Procedures

I am hitting my stored procedure API in azure Cosmos DB, but I am getting back the message { "code": "BadRequest", "message": "Message: {\"Errors\":[\"PartitionKey extracted from document doesn't ...
0
votes
1answer
23 views

Use Case Class To Trim DataFrame

I have the following code. In cosmo giant JSONs containing data are stored. Currently, the display command displays all of the fields in the Azure Cosmos DB location. However, I only want to display ...
0
votes
1answer
42 views

Azure function is giving not a valid Base-64 string error

I have a http-trigger with a CosmosDB output binding and a simplest of a function as below. public static class AddRequest { [FunctionName("AddRequest")] public static async Task<...
0
votes
1answer
25 views

What is the advised way to query documents from different partitions in CosmosDB?

When using Azure Cosmos DB and querying one partition, i just specify the partition key in the FeedOptions. But when i have to query n partitions, i have (afaik) 2 options: Run a separate Task for ...
0
votes
0answers
18 views

Cannot connect to Azure Cosmos DB (MongoDB flavour)

I have set up a MongoDB in Azure Cosmos DB, and I am unable to connect to it. When creating the Cosmos DB, I have left all parameters default, except for the firewall: this I turned off. I can view ...
0
votes
1answer
19 views

How to setup Azure CosmosDB trigger in Nodejs

I want to listen to any document update event on my cosmosDB collection, and get the updated document. I came to know that I can use triggers to accomplish this. But couldn't find a way set this up. ...
0
votes
0answers
22 views

Cluster.builder() keeps on hanging in Xamarin when connecting to Cassandra API

I'm writing an application with Xamarin in which I want to connect to the Cassandra API from Azure Cosmos DB. The Azure Portal provides some quick start code which should get me started with ...
0
votes
0answers
19 views

Document Database - Data modeling with nested data (CosmosDB, Mongo, etc)

We have customer location data in our RDMBS now and are researching our vNext architecture, which may be converted to a Document DB (Json) architecture. I would appreciate any suggestions/references/...
-1
votes
1answer
15 views

Billing in CosmosDb when increasing RU for 5 minutes

How would billing work in Azure CosmosDb if I use the SDK to increase the throughput for a small amount of time, like 5 minutes? Will I be charged one hour of the max RU or just a fraction of the ...
0
votes
1answer
25 views

Cosmos DB query on a sub section for a specific document

ANSWER: Seems like you need to do a join: select value g from c join g in c.groups where c.id='2' and g.id=2 ISSUE: I am trying to query a subsection of a specific document: [ { "name"...
0
votes
1answer
41 views

Use vertex property value to create edge when traversing multiple vertex programatically

I find that when importing data into the graph from a DB or any format in which I have a relationships as column keys, I have the need to create Edges using these keys which are already properties in ...
0
votes
1answer
20 views

Returning a scalar object

Is there any way in cosmos db to return a scalar object instead of an array? SELECT * FROM c where c.VesselId=40 returns: [ { "VesselId": 40, "LatestReportId": null, "...
0
votes
1answer
14 views

CosmosDb not using the ContractResolver provided when generating select queries

I have a project where I'm using CosmosDb (SQL API) as my database. It's a .Net Core project and I'm using the latest stable NuGet packages. The document client is created as follows and use a custom ...
0
votes
1answer
31 views

Update another collection everytime a new document is inserted

I have two collections. As far as I can read (feel free to correct me if I am wrong) then you cannot join data between collections. So I am looking for the best approach to update one collection, ...
0
votes
1answer
22 views

How could I export data from Cosmos DB

I would like to export all collections from my Cosmos DB in Azure. Actually it would be more than enough to have everything as a json, one big does not matter, then I will try to load it in other ...
-1
votes
0answers
45 views

cosmos DB issue with Service Fabric

I am developing a multi-tenant App using CosmosDB and Service fabric. The data is accessed via User tokens. user = new User { Id = config.PartitionKey }; user = await client.CreateUserAsync(...
0
votes
1answer
17 views

Lowercase Property Names

I am adding a document to Cosmos DB with following line: client.CreateDocumentAsync(collectionLink, report).Wait(); My c# classes are uppercase however standard json you lowercase properties. Is it ...
0
votes
1answer
19 views

How to query CosmosDb for multiple results using SqlQuerySpec

I'm trying to get multiple documents using a list of numbers. Here's my query var queryString ="Select * from c Where c.id in (@list)"; var queryParam = new Microsoft.Azure.Documents.SqlParameter("@...
1
vote
1answer
34 views

UnknownHostException when connecting to Azure Cosmos DB using Cassandra

I followed the official instructions of Azure Portal. This is my config.properties: cassandra_host="demodemodemo.cassandra.cosmosdb.azure.com" cassandra_username="demo" cassandra_password="...
0
votes
0answers
17 views

graph db modelling - Node vs Property on a node or edge

Understand that this is more of a design question and could not find a definitive guideline and we are new on this graph db journey. Question : We are trying to model a network in graph db and are ...
0
votes
0answers
19 views

Cosmos DB - Gateway Service has stopped

i'm working with Cosmos DB in windows server 2012 r2, but, when complete installation and initialize the service opens a popup showing that the gateway Service did not start, I looked in the forums ...
0
votes
1answer
66 views

Multiple entries in Cosmos DB ASP.NET MVC

I am creating a CRUD application to add records to Cosmos DB. I have a JSON file that i use for the data. When there is only one object everything works but when my json file contains multiple objects ...
1
vote
1answer
22 views

Query cosmos db siblings with no childs

Is it possible to query cosmos db without returning child? I want following result: [{"groupId":1,"name":"group1"},{"groupId":2,"name":"group2"}] From following: { "groups": [ { ...
1
vote
1answer
58 views

CosmosDB C# Gremlin - Getting exception when sending query

Taken from: https://docs.microsoft.com/en-us/azure/cosmos-db/create-graph-dotnet Am getting a exception on the .wait() part: NullReferenceException: Object reference not set to an instance of an ...
0
votes
1answer
28 views

Cosmos DB data migration

Wanted to implement my own backup mechanism for Cosmos DB. In order to do that wanted just to grab the data every x hours and put it onto some other storage account / different cosmos db instance. ...