Questions tagged [azure-cosmosdb-sqlapi]
1222 questions
3
votes
1 answer
IN query with combination with 2 field
I have a list of devices in cosmos DB documents (thousands), Make and SerialNumber is a unique identifier for each asset.
[{
"make": "CAT",
"serial": "A1",
"NAME": "CAR"
},
{
"make": "ZAT",
"serial": "B1",
"NAME": "BUS"
}, {
…

Pankaj Rawat
- 4,037
- 6
- 41
- 73
3
votes
1 answer
PartitionKey value must be supplied for this operation
I am trying to retrieve a document from the Azure Cosmos Db Collection. I am running into an error
Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is…

Nikhil Jain
- 586
- 6
- 21
3
votes
1 answer
Can cosmos db id be override to integer type?
I am trying to manually specify the id field of my documents, however I can not find how can I insert an integer value for the property.
I am using python module of azure.cosmos and when I try to insert an integer value, it seems to hit an error in…

Todor Popov
- 77
- 3
- 6
3
votes
2 answers
Cosmos DB : cross partition query can not be directly served by the gateway
Any idea why when I execute the query below in Cosmos DB using the rest api
I get the error below? The same query without the order by works fine...
I have set the header "x-ms-documentdb-query-enablecrosspartition: True" in both cases and I am…

JupiterN
- 143
- 2
- 9
3
votes
1 answer
Azure Cosomos DB stored procedure response size too large
I have Sensor IoT Data which is getting stored in cosmos DB . I need minute level aggregation of data for last 30 days to show in webapp. So i have written stored procedure for it to do group by and aggregations of sensors data.
it is giving…

Amjath Khan
- 185
- 11
3
votes
0 answers
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 showing the Result as I want. but while executing the…

Ajit
- 91
- 5
3
votes
1 answer
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 documents tab if I'm using any filter then also it…

Satyaray Singh
- 267
- 3
- 11
3
votes
2 answers
Query CosmosDb Unstructured JSON
How can CosmosDB Query the values of the properties within a dynamic JSON?
The app allows storing a JSON as a set of custom properties for an object. They are serialized and stored in CosmosDb. For example, here are two entries:
{
"id":…

Ovi
- 2,620
- 7
- 34
- 51
3
votes
0 answers
Spring Data Azure Cosmos DB using memory database on Linux. Is it possible?
I am using Sring Data Cosmos DB implementation by connecting in a Cosmos DB SQL API instance on Azure, and it works fine. But I would like one database to run my integration tests locally on Linux, whether it's the Cosmos DB database (SQL API) or…

thiagoteixeira
- 41
- 1
- 6
3
votes
1 answer
ARRAY_CONTAINS query with single string values in CosmosDB
Just for example lets say i have a document in Cosmos document DB looking something like this:
{
"somename" : "myname"
"data": {
"meta": {
"versionId": "1",
"lastUpdated": "somedate",
"myStringArray": [
…

jagge123
- 263
- 1
- 5
- 15
3
votes
1 answer
How can I get the number of RU's consumed when executing a stored procedure in Azure Cosmos DB?
I am writing a Cosmos DB stored procedure which has multiple Queries inside it. I want to know the number of RU's consumed when the Stored Procedure Executes.Once the Stored Procedure is executed there is no log of number of RU's consumed,which…

programmerP
- 43
- 2
3
votes
2 answers
Fetch multiple types of entities From CosmosDb in a single query
I am trying to get all the types of entities from a Collection in CosmosDb using the sql API. But I get only the BaseClass entities instead of the specific class entities.
Here are my models:
public class ActivityBase: { // common properties for all…

bit
- 4,407
- 1
- 28
- 50
3
votes
1 answer
Cosmos DB Stored Procedures, UDF & reuseable code - how do they fit together?
I've got many questions :)
I've started to use Cosmos DB (SQL API). Loving it!
But I'm struggling to discover the best way of building and managing code. I'm using Visual Studio.
Here's some code, and I'll base my questions on these 4 javascript…

Josh
- 2,958
- 3
- 16
- 27
3
votes
2 answers
Use Linq.Any() inside a Linq.Where() on CosmosDb
I am trying to nest an .Any() inside a .Where() clause to query a local CosmosDb emulator.
The code looks like below; where permittedStundentIds is a variable (List) and a is a Document within the CosmosDb
.Where(a =>…

bit
- 4,407
- 1
- 28
- 50
3
votes
1 answer
Cosmos Data migration tool throws Error while Migrating data from SQL Database to Azure Cosmos DB Emulator
I'm Trying to import the data from SQL Database to Cosmos Db but it throws an error as Service is currently unavailable. I have no idea why it's showing this error. Azure Cosmos DB Emulator is also On. The error is as follows
$…

Satyaray Singh
- 267
- 3
- 11