Newest 'azure-cosmosdb' Questions - Stack Overflow

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 of popular APIs and programming models.

0
votes
1answer
15 views

Microsoft.Azure.Management.CosmosDB.Fluent fails when setting IpRangeFilter

When using the Fluent Azure Cosmos Api (1.22.2) to update the ip range: var cosmos = azure.CosmosDBAccounts.GetByResourceGroup(cosmosResourceGroup, cosmosAccountName); cosmos.Update()....
0
votes
1answer
13 views

Azure Functions CosmosDb OutPut Bindings Where To Store ConnectionStringSetting

I have a Azure Function V2. public static async Task<IActionResult> Run( [HttpTrigger(AuthorizationLevel.Function, "get", "post", Route = null)] HttpRequest req, [CosmosDB( ...
0
votes
2answers
24 views

Partition Key Vs Document Id in CosmosDB

If I store documents without providing partition key, In this case documentId will be treated as Partition Key of Logical Partition? If yes: how about Billion logical partitions in that collection? I ...
1
vote
2answers
22 views

Can't scale down database

I have created a Cosmos DB Database and set throughput to be provisioned at the database level. When the number of containers exceeds 4 the throughput starts automatically increasing by 100 RU/s for ...
0
votes
1answer
27 views

Azure App Function (Functions 2.x): Create new document in CosmosDB via HTTP function

I'm trying to implement an Azure HTTP function which gets some JSON data and creates a new object in my CosmoDB database. I've read the following questions, on Stackoverflow: Azure function C#: ...
1
vote
1answer
27 views

Unable to update the cosmosDB collection from Azure triggering function

I have created a collection in cosmosDB with a unique key. Ideally collection should be updated with new values if an existing key is entered as input for the collection. I have an Azure cosmosDB ...
0
votes
0answers
22 views

Unresolvable contact point, can't connect to azure cosmos db database

I was setting up a new server to play around with the Cassandra api and cosmosdb. I was following Microsoft quick start guide in connecting to the server and its tutorial and after completing all the ...
0
votes
1answer
49 views

How do I securely store connection strings client id etc?

Let me give some details of my setup I am building an asp.net core API app being hosted on Azure. I store my secret keys and stuff in azure keyvault. However, I have some AzureAddClientId and secret ...
-1
votes
1answer
20 views

Is possible to view users and permissions in the azure portal - CosmosDB?

I can able to create and set permissions of users in Azure cosmosDB using Rest API and DocumentClient/CosmosClient. But there is no UI part for creating the user under database in Azure portal(...
0
votes
0answers
13 views

Store Dynamic Property in Gremlin Vertex

I am working on moving a SQL Cosmos collection set over to a graph (our data works well with graphing) and I am having a problem. I have one property on my vertex that is a dynamic object. It varies (...
0
votes
0answers
10 views

Get Object type from in CosmosDB ChangefeedObserver Document

I have a project that needs to monitor a number of collections within a number of cosmosDB's with the CosmosDB Change Feed. The signature for the ChangeFeedObserver is pretty explicit, to where I'm ...
0
votes
0answers
45 views

Cosmos Trigger not triggering

I have created cosmosdb and azure function 1.0 using visual studio. I have added cosmosdb connectionstring and storageaccount key in local.settings.json While adding or modifying in cosmos my azure ...
0
votes
1answer
14 views

Setting consistency level for Read operation in Azure CosmosDB Cassandra API

I am writing a Java application that connects to a Cassandra database within Microsoft Azure CosmosDB. As per the documentation page at https://docs.microsoft.com/en-us/azure/cosmos-db/how-to-manage-...
0
votes
1answer
38 views

How to create new Partitions without creating a new collection?

I'm trying to create a new Partitions inside of a collection without creating a new Collection? I already created a new collection with a new partionkey, but now I'm trying to create some inside of a ...
0
votes
2answers
28 views

Clone an Edge and target vertex in Cosmos Gremlin

g.AddV('test').property('id','1').property('name','test 1') g.AddV('test').property('id','2').property('name','test 2') g.V('1').AddE('owns').to(g.AddV('another').property('id','3')) Is there any ...
1
vote
1answer
43 views

“group by” functionality in azure-cosmosdb-java

I want to perform "group-by" operation in a cosmos-db collection using java. But as this link shows this feature ('group by') is still under active development and not yet supported. What I want is ...
0
votes
2answers
30 views

StatusCode: InvalidPartition when creating Collection then writing, reading, finally deleting collection. Happens on the second time do this sequence

I have a REST API server that triggers some operations on my NoSQL Cosmos database My script has this pattern: 1. create collection 2. write 20 documents to the new collection 3. query the collection ...
-1
votes
0answers
14 views

What does client session consistency mean in Azure Cosmos DB?

I am trying to understand which Cosmos DB consistency mode is the most suitable for a scenario where I run multiple Kubernetes pods within a single Azure region and want every read to return the most ...
-1
votes
0answers
12 views

issues with viewing inserted document in data explorer of cosmosDB in azure portal.(Unable to query when inserting the record using mongoDB API)

I use MongoDB API to insert my record into CosmosDB, and I can see each record as a document in data explorer of CosmosDB in azure portal. I am unable to query the inserted records for no reason, so I ...
0
votes
0answers
19 views

gremlin.net : Thread was aborted in Gremlin 3.4.2

I am using Gremlin.Net 3.4.2 and CosmosDb I have started to get the Exception "Thread was being aborted." with the stacktrace at Gremlin.Net.Driver.GremlinClientExtensions.<SubmitAsync>d__2....
0
votes
1answer
15 views

Azure Cosmos DB - SQL API range filter in WHERE condition

I am trying to filter data based on "amount" range in SQL API query WHERE condition. The amount value could be an integer value without double quotes or decimal value with double quotes. Basically I ...
0
votes
0answers
10 views

Azure Cosmos DB GeoJson support - MultiPolygon, Feature

I'm trying to understand what types of GeoJson objects I can store and work with in Azure Cosmos DB. As per this documentation - https://docs.microsoft.com/en-us/azure/cosmos-db/geospatial you can ...
0
votes
0answers
11 views

azure-cosmosdb-spark configuration reference

I'm using the azure-cosmosdb-spark connector to read and write between Cosmos DB and Spark. I'm wondering if there's a reference for the configuration specifications. Of course I can use the examples ...
0
votes
1answer
21 views

Singleton Azure Cosmos DB client

Use a singleton Azure Cosmos DB client for the lifetime of your application Each DocumentClient instance is thread-safe and performs efficient connection management and address caching when ...
0
votes
0answers
30 views

why does DocumentDb ExecuteNextAsync hang?

I am hitting a Async programming issue. (similar to this ExecuteNextAsync freezes/hangs in Azure Cosmos DB) It hangs on the line: return results; I tried saying return results.ToArray();...
0
votes
0answers
13 views

Logging API is not working after sometime from Databricks to CosmosDB

I am trying to create an API for logging data to Azure Cosmos DB from Azure Databricks. Sometimes, it is working perfect. But sometimes, it's getting stopped and giving me the following error: "org....
1
vote
1answer
34 views

How to display the position within an array with Cosmos DB SQL

I have a problem attempting to select from a document array in Cosmos-db. (SQL-api) I am able to select the values from the array however I would like to be able to display each of the values ...
0
votes
1answer
37 views

Azure Function CosmosDb Trigger processes same documents over and over

I have a function that is triggered by CosmosDb insert/updates and I copy each document to a storage blob. When debugging, the function fires over and over again for the same handful of documents. I'...
0
votes
1answer
15 views

Is it possible to read some value and then use this value in an update?

The environment is gremlin (cosmos, specifically). I would like to migrate a value from Vertex A to Vertex B. The vertices are connected by an edge, e.g. A (Name: 'x') -[connected]-> B Is it ...
0
votes
0answers
20 views

Search with special characters in Mongoose API connected to azure cosmos DB

I am trying to query results from azure cosmos db using Mongoose API, Search strings which I am passing have special characters like #,/,=,?,&,$,_,., etc. I tried encodeURI and ...
0
votes
3answers
29 views

Free open source tool to delete multiple documents in Azure Cosmos DB

On Azure Cosmos DB portal, Data Explorer doesn't allow deletion of more than one document. Is it possible to delete multiple documents in one go? Update Is there free open source tool that can do ...
0
votes
1answer
24 views

What is the username of cosmosdb emulator account?

We are provided with the username of our azure Cosmos Db account in Connection String blade in azure portal. But no details about the username is provided for Cosmos Db emulator. Only a key is ...
0
votes
1answer
14 views

Trying to populate dropdown using the result of mongo query

I have created a grafana application. I am using the variables function and within that, I have the option to return a query which populates the dropdown. I have tested the query in a normal table ...
1
vote
2answers
50 views

How to insert mutliple where clauses into an SQL string

I'm using an Azure Cosmos NoSQL database with SQL syntax. How do I create an SQL string that can dynamically add more WHERE statements? For example, I want to be able to not have to code in "WHERE f.%...
0
votes
0answers
22 views

CosmosDB (MongoDB) does restore failure and misleading info

I am trying to restore a MongoDB database backup (native mongodb dump) on Azure CosmosDB. It always completes (so it says) but I always end up wih a fraction of the documents in the backup. Works ...
0
votes
1answer
30 views

How to get the number of partitions in CosmosDB MongoDB API

In order to tune the performance of a CosmosDB for MongoDB API, I need to get the number of partitions in a collection. The naive way of doing this would be to query for all distinct values for the ...
0
votes
0answers
37 views

get all product list return with entry array list inside of product

I have done a get all product api.but it returning like blow. please correct me ,what did i wrong ? My repository code: public async Task<IEnumerable<Product>> FetchProductListAsync( ...
1
vote
1answer
23 views

DocumentDB SQL where Array of Objects matches an array of strings

reference: DocumentDB SQL with ARRAY_CONTAINS Question: Is there a better and more efficient query for what is happening below? In the above reference question, the UDF was written to check if an ...
-8
votes
2answers
71 views

How to delete a Product

How to delete the following query using asp.net core web api. Query : Select * From catalog.Industy.Category.Subcategory.Product Where Product.Id="97c27069-4a16-44c3-bdf1-627c8ea339fa" json body: ...
1
vote
1answer
18 views

Unexpected behavior of ARRAY_SLICE in Cosmos Db SQL API

I have Cosmos DB collection (called sample) containing the following documents: [ { "id": "id1", "messages": [ { "messageId": "message1", ...
0
votes
2answers
43 views

Microsoft.Azure.Documents.BadRequestException: ResourceType Document is unexpected

I am trying to update a specific product in my database.I pass the product value from body and replace it .here my partition key is catlog id.blow i give alll my code example please tell me what did i ...
0
votes
1answer
30 views

Cosmos DB Trigger not working due to binding error

I have a cosmos db and I want to use it to trigger an azure function. When I do, I get this error: A ScriptHost error has occurred Exception while executing function Exception binding parameter '...
0
votes
1answer
33 views

How do I mock the .Where() extension of a mocked IQueryable<T> using NSubstitite [duplicate]

so the code under test is: var query = _documentClient.CreateDocumentQuery<TEntity>(CollectionUri, GetFeedOptions()).AsQueryable(); foreach (var filter in filters) { query = query.Where(...
0
votes
1answer
36 views

How to query cosmos db for some documents, change their properties and save them back

I am struggling with an azure function. The goal of the function is to get some objects from cosmos db, update them, and save them back. The function looks more or less like this [FunctionName("...
0
votes
1answer
42 views

Getting Error When Posting data into Azure Cosmos DB using Azure functions C#?

We are getting Error "'System.Diagnostics.Eventing.EventProviderTraceListener' from assembly 'System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'.)'" When posting data into ...
0
votes
1answer
24 views

JsonSerializationException: Cannot deserialize the current JSON object. in asp.net core

I am creating a web api using asp.net core and cosmos db.I create a api for get all item.I got the following error.I provide all my repository , controller code blow. please help me to find out what ...
0
votes
0answers
27 views

CosmodDB (MongoDB) - cannot save documents only 6KB in size

I am trying to loop through a collection of small documents (about 6KB each) and upsert them into CosmosDB (MongoDB). I keep running into issues where documents are randomly getting rejected - it says ...
0
votes
1answer
33 views

Storage setting on Azure Cosmos DB keeps changing from Unlimited to Fixed when deleting and re-creating database using API

I am currently seeding our Cosmos DB using the Azure API via a C# console application. During this process, I delete and recreate the database to ensure that all pre-existing data is removed (this ...
0
votes
1answer
60 views

JsonSerializationException: Cannot deserialize the current JSON object (e.g. {“name”:“value”}) into type

I am developing a web api .I got the following error . same code structure working for fetchbyid ,post,edit . What did i wrong here . please help me. Catalog.cs: public class Catalog { ...
-5
votes
1answer
34 views

An unhandled exception occurred while processing the request in cosmos db and asp.net core

I am creating a web api using asp.net core and cosmos db. i wrote a query and try to execute it .but i got the following error.I upload all my code by images . please help me.