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-cosmosdb
Filter by
Sorted by
Tagged with
-2 votes
1 answer
48 views

How is Azure Cosmos DB for NoSQL a document database (non relational) and supports SQL at the same time?

According to Azure documentation Cosmos DB is a document database (non relational) and at the same time it supoprts SQL, how is that possible ? <<The Azure Cosmos DB API for NoSQL stores data in ...
Arsany's user avatar
  • 27
0 votes
0 answers
62 views

Facing issue to create Cosmos Db using .NET core SDK

The code successfully created the container, which is now available for use. However, when attempting to create a database, it enters an infinite loop. var name = "cosmosdb_emulator"; var ...
Shashikant Nalavade's user avatar
0 votes
1 answer
26 views

.net Azure Cosmos SDK: Predicatebuilder for Query in nested collection

I have a data structure public record CarMake { public List<Car> Cars { get; set; } public string Id {get;set; } } now I want to use a Predicate-Builder to only return those items from ...
Jan's user avatar
  • 4,017
0 votes
0 answers
43 views

Cosmos Gremlin API unique property value policy

I have several vertex types (labels), and for each of them i would like a unique property that would stop any additional vertex to be created with the same property. Think phone number for the phone ...
Martijn B's user avatar
0 votes
0 answers
35 views

LINQ expression could not be translated querying child list properties

Doing something that seems really simple using EF, DbContext and CosmosDB. Trying to get a list of items based on a field in a child list being equal to a parameter. Source of the predicate to the ...
shamusschubert's user avatar
0 votes
1 answer
35 views

Cosmos Db pre or post triggers not being triggered

I have a cosmos db for NoSql instance I'm working on. I have a collection, let's coll it "my-coll". I want to add a property in any document being added to the collection. The Training for ...
strongmmc's user avatar
  • 147
0 votes
0 answers
16 views

Cosmos DB number precision issue when aggregating [duplicate]

I ran into an issue with a query that was summing up multiple values and returning the sum back to the calling .net application and so have been trying to figure out the right way to go about this. On ...
arvindram11's user avatar
0 votes
1 answer
64 views

The type or namespace name 'Id' could not be found (are you missing a using directive or an assembly reference?) CosmosDBOutput Problem

So the problem that I am encoutring is that I can't use "ID" again, it keeps giving me error for my CosmosDBOutput, I'm not sure why that is but I need help with this if anyone can help fix ...
Faizan Shaikh's user avatar
0 votes
0 answers
35 views

500 Internal Server Error when Posting to Azure Serverless Function Connecting to Cosmos DB with Node.js [closed]

I am new to Azure serverless functions and I am attempting to create an Azure Function that connects to Cosmos DB (NoSQL). So far, I have set up my Cosmos DB and created an Azure Function. I have also ...
Snooper_A's user avatar
  • 107
-3 votes
0 answers
35 views

How to update postgres server parameters like effective_cache_size on Azure Cosmos Db for citus extension? [closed]

I didn't get the parameter to update the value like effective_cache_size and maintenance_work_mem etc. I have checked both coordinator and worker nodes but didn't get effective_cache_size, ...
Prateek Varshney's user avatar
0 votes
1 answer
27 views

How to connect in case Azure Cosmos DB default force use TLS/SSL?

My case: Client: Windows 10 x64. pgAdmin 4 version 8.4 (latest). Server: Cloud Azure Cosmos DB for PostgreSQL burstable, version 16. My connection string will be likes this jdbc:postgresql://c-...
Vy Do's user avatar
  • 49.3k
-2 votes
0 answers
31 views

Customer Managed Key for Azure cosmosdb for postgresql using Terraform [closed]

Does anyone has an idea on how to add customer managed key to Azure cosmosdb for Postgresql through Terraform. I went through this document(https://registry.terraform.io/providers/hashicorp/azurerm/...
Shreyash Ganvir's user avatar
0 votes
1 answer
48 views

.net Azure Cosmos SDK aggregate functions

No matter what I try, I cannot get Max(), MaxAsync() or a direct SQL Query get to work in Microsoft.Azure.Cosmos 3.38.1. If I run the following statement in the Cosmos DB Emulator SELECT MAX(f....
Jan's user avatar
  • 4,017
0 votes
0 answers
27 views

CosmosDB EF Core 8 derived type configuration

I'd like to use a common base class for a collection in cosmosdb and query it via EF Core 8. The general idea is that my entities will be similar and have a common base but be able to add new ...
tobyd's user avatar
  • 316
0 votes
1 answer
88 views

How to add new documents to Azure AI Search Index with potential new fields

I'd like to have an azure function such that whenever there is a new document added to an Azure Cosmos DB service, it automatically adds this new document to an existing index of an Azure AI Search ...
JamesB's user avatar
  • 1
0 votes
0 answers
16 views

SpringData - CosmosDB - FluxUsingWhen cannot be cast to class Slice - Pagination

I am trying implement Pagination in cosmosdb as per the link here as follows. @Repository public interface UserRepository extends ReactiveCosmosRepository<User, String>{ Slice<User> ...
amdg's user avatar
  • 2,219
0 votes
1 answer
25 views

Partition rebalancing on data deletion in Cosmos DB

We have a query regarding the partition rebalancing mechanism in Cosmos DB, particularly when a significant amount of data is deleted from the database. In our use case scenario, we are interested in ...
user3776489's user avatar
0 votes
0 answers
49 views

CosmoDB SQL - Select sub document properties

I have a CosmoDB document that looks like this: { "id": "something", "object": { "a": { "property": "xxx" ...
Angelo Badellino's user avatar
0 votes
0 answers
38 views

Query result inconsistency between stored procedure and SDK calls [closed]

I have a clean up stored procedure that deletes data in Cosmos DB. Before deleting the items, it queries based on a small condition which you can see in the code snippet. var filterQuery = { ...
Yigit Yuksel's user avatar
  • 1,100
1 vote
1 answer
28 views

Azure NoSQL cosmosdb schema validation/locking

We are creating .Net core 7 based CRUD operation apis. database is Azure NoSQL cosmos db. We are using CosmosClient. Our apis are stable now. We want to ensure that any new changes in api's do not ...
JemHah's user avatar
  • 464
0 votes
0 answers
30 views

Cosmos DB Indexing policy [closed]

The below is my cosmos db document object { "id": "0ef78d0e-0a8d-448d-b50b-8203c7b086fc", "ConsumerID": "123512", "ConsumerName": "...
Venkat Subramaniyam's user avatar
1 vote
1 answer
83 views

Azure Cosmos DB for MongoDB (vCore) connection string not valid exception

I've set up a free cosmos DB for mongoDB vcore database without any issues, I've then been able to utilise the provided connection string to connect to the database with my credentials on both ...
Olivia Bates's user avatar
0 votes
0 answers
58 views

C#, EF Core CosmosDB - could not be translated. Either rewrite the query in a form that can be translated, or switch to client evaluation

Using this very simple (IMHO) line of code I and getting below error. I am using EF and CosmosDB. I have tried calling 'ToList' and others per the error, but no luck. Perhaps something simple that ...
shamusschubert's user avatar
2 votes
0 answers
58 views

CosmosDB: .NET/C# Mongo API: Simple upsert on single document causes MongoExecutionTimeoutException: Operation exceeded time limit

We are having intermittent, but daily, issues across all our services that use the Azure CosmosDB MongoDB. Even though the write pressure is not high, seemingly random upsert operations suddenly stop ...
der.Schtefan's user avatar
0 votes
0 answers
106 views

Can not connected to ComosDB for MongoDB (vCore) from Azure Data Factory

i try to add Cosmos DB Linked service in Azure Data Factory to copy documents from NoSQL API database to MongoDB API (vCore) database. In ADF we have default connectors to Cosmos DB NoSQL API but not ...
michasaucer's user avatar
  • 4,809
0 votes
1 answer
46 views

Updating value of the document / row in azure cosmosdb in python

Evening all, I am writing small project, and want to add to te website hosted in azure storage (which is static) visit counter. I want to write short script in python that when called in Azure ...
Daniel T's user avatar
0 votes
1 answer
50 views

How to query against array in Cosmos using sql?

This is my data where I want to get stockNumber if operationId in lineItems is occurring more than once. i.e., as an output, my query should return 2002762240 out of these 2 records because it has ...
GThree's user avatar
  • 3,044
0 votes
0 answers
47 views

Create a non partition container in Azure cosmos db using python script

I'm using this script to create a non partition container, i.e. without specifying any partition key while running the python script. I want to insert some records to this container without specifying ...
Suraj221b's user avatar
  • 102
0 votes
1 answer
154 views

Cosmos DB not triggering

I need some help clarifying something here. I'm have two functions as seen below Function.cs [Function("TestServiceBus")] public async Task ServiceBusReceivedMessageFunction( [...
DonDavid12's user avatar
0 votes
1 answer
37 views

Need help flattening a multi-array item in Cosmos

I'm still somewhat inexperienced with Cosmos. I have a multi-array item that I need to flatten. What we have are multiple Project items with a variable number of Resources. Each Resource also has a ...
Brad's user avatar
  • 57
0 votes
0 answers
80 views

Unable to Retrieve Documents After Applying Query on Azure REST API via postman

I am encountering an issue while performing a Cosmos query in Postman. Despite executing the same query successfully on Azure, Postman isn't retrieving any documents, as depicted in the attached ...
user23470697's user avatar
0 votes
1 answer
53 views

How to query DateTimeOffset in Cosmos?

I have the following data where I want to query against itemUpdateDateTime. [ { "itemUpdateDateTime": "2024-08-13T22:34:35.9988856+00:00", "location": ...
GThree's user avatar
  • 3,044
-1 votes
1 answer
86 views

How to deploy to Azure Static Web App with database connection in Svelte using GitHub workflow?

I have created a Svelte skeleton web application and a Cosmos NoSQL database. I installed the swa CLI tool using npm install -g @azure/static-web-apps-cli command. Furthermore, I was following the ...
Péter Szilvási's user avatar
0 votes
0 answers
58 views

Is there a specified order for data replication among different partitions in Cosmos DB?

I have 1 write region (e.g., US), and 2 read regions (e.g., US and EU). I have a collection, and I want to write into it, using different partition keys. I wonder, is there a specified order for data ...
Denis's user avatar
  • 3,697
0 votes
1 answer
150 views

connection is insufficiently secured Error in Azure cosmos DB Data Migration tool

I am trying to load JSON file data into cosmos DB container using Azure cosmos DB data migration tool but I'm unable verify my database connection when clicked on verify. The error is as follows I ...
Hussain's user avatar
  • 29
1 vote
0 answers
71 views

Azure Cosmos MongoDB says Out of Throughput of one account, but is working on a different account [closed]

When I implemented my codes on my local end and my private account, Azure cosmos DB works for me. But when I try to connect to a different account, I got this warning: Error in /nonogram route: ...
Malaka 's user avatar
1 vote
1 answer
64 views

Cannot reduce RU on Azure Cosmos DB

I need help to know why I can't adjust these down to 400 RU/s from 1000 RU/s: Azure Cosmos DB Screenshot When I set to Manual I also get this issue: Manual Provisioning What steps do I need to take to ...
android4's user avatar
0 votes
1 answer
82 views

Execute background process in python

In python, I am trying to run a process (storing huge amount of data to db) as a background process and it should not wait to return the response of current executing function. I tried the below code. ...
Smith Dwayne's user avatar
  • 2,725
0 votes
1 answer
57 views

Why do I get different @CosmosDBInput properties then every documentation I can find?

I want to connect to a Cosmos DB in Azure from Azure Functions written in Java Code in an Maven Project (written in Intellij). The whole thing should be triggered by a HTTP request. The HTTP request ...
Manuel 's user avatar
  • 711
0 votes
1 answer
92 views

How to log a QueryDefinition with applied parameters?

One can create a QueryDefinition (package: Microsoft.Azure.Cosmos) in .NET with following C# code QueryDefinition query = new QueryDefinition( "select * from t where t.Account = @account"...
Kaarlo Räihä's user avatar
2 votes
1 answer
55 views

Possible mutation of static readonly record through Cosmos SDK and Newtonsoft

This is a very awkward error and it took me a while to tackle it down to these few lines of code. The full code can be grabbed as fiddle, but you have to provide your Cosmos Url and Key to let it run. ...
Oliver's user avatar
  • 44.1k
0 votes
1 answer
106 views

Cosmos query to find unique count

I have the following documents in Cosmos where I want to get distinct count of stockNumber with associated lineItems with Waiting-Reconciliation status. Data: Doc-1: { "stockNumber": &...
GThree's user avatar
  • 3,044
0 votes
1 answer
61 views

Azure Data Factory converts date strings to unix timestamp

I have an ADF that I want to use to copy documents between to CosmosDB containers. In the process, I wish to a a new column 'type' with a hardcoded value. It works great. There is however 2 fields on ...
span's user avatar
  • 5,504
0 votes
1 answer
92 views

How to convert string "mm/dd/yyyy hh:mm:ss AM/PM" to DateTime format in Cosmos DB query

How to convert string "mm/dd/yyyy hh:mm:ss AM/PM" to DateTime format in Cosmos DB query. E.g.: Date is stored as "8/19/2023 4:44:55 PM" and it needs to converted into standard date ...
Arpit's user avatar
  • 23
1 vote
0 answers
60 views

Partition a non partitioned container in azure cosmos db without any downtime [closed]

I have a non partitioned container in azure cosmos DB, which has a size of 5.9 GB. I want to make this container partitioned using one of its fields. Since this container is being used in the live ...
Suraj221b's user avatar
  • 102
1 vote
1 answer
97 views

Current Code Cosmos DB 3.37.1: PartitionKey key mismatch exception

This question had been asked many times and even answered correctly a few times, I've seen them all, and yet, it happens to me no matter what I do. Here is the code: Creating container: string ...
Leon's user avatar
  • 339
1 vote
1 answer
74 views

How to enable the server side entry feature for Cosmos db using Bicep template

I have not defined anything related to the features in my script and not sure what to be included to enable the "ServerSideEntry" feature for a cosmos db. Below one is my script: // Cosmos ...
nikon D3400's user avatar
2 votes
1 answer
85 views

Get a result object from Cosmos DB that has an interface as an object member

Currently I have a class stored in Cosmos DB. That class has an interface as a member variable. When I try and query for that and iterate over the results I get an exception. public class Group { [...
thetreat's user avatar
  • 335
0 votes
0 answers
94 views

Find count greater than 1 in Azure CosmosDB

I am querying the below to get the count, uniqueid, Amount Select uniqueID,c.AmtPercent, count(1) as count from c Group by c.uniqueId, c.AmtPercent I want the rows where count(1) > 1 Please see the ...
Chandar's user avatar
  • 31
0 votes
0 answers
93 views

Azure cosmos db emulator macOS - Win32Exception/CoreCLR

I have downloaded the docker image azure-cosmos-emulator:latest on macOS(BigSur). It starts up fine but when I try to load it in the browser(https://localhost:8081/_explorer/index.html), I'm getting 2 ...
amdg's user avatar
  • 2,219

1
2 3 4 5
152