Questions tagged [azure-cosmosdb-sqlapi]
1222 questions
-1
votes
1 answer
Can we create documents in multiple containers using CosmosDb stored procedure?
my requirement is to create documents in multiple containers in cosmos Db using stored procedure. I need to create a document in a container and log that in another container. I'm using SQL API.

Shekhar Kumar
- 71
- 9
-1
votes
1 answer
How to store Unbeautified (Without whitespaces) JSON into Cosmos Db
TARGET: Store data to Cosmos DB without beautifying the json (remove white spaces)
PROBLEM: New Document is createed in CosmosDB with beautified, but it has white spaces in the content memory size of the document is almost 100kb. copied the content…

Saidi Reddy
- 1
- 1
-1
votes
1 answer
How to write sql query for cosmos db with random number as key?
I want to query cosmos db where i want to fetch all document where user_list has "13" : true
i want to execute something like this but this sql query is not working i want to know how i can query this document. select * from c where…

Mohit Singh
- 401
- 1
- 10
- 30
-1
votes
1 answer
How can I export data from cosmosdb to .json file
how can I export data from cosmosdb in json file, in safe way, without locking table?
and preferred to have ability to download only some properties from document with query.

TamKap
- 139
- 3
- 9
-1
votes
1 answer
Cosmosdb partision
I have a cosmos db container with below fields (id,name,Category,Type). I am new to cosmos db and playing around with it. I will be doing search
using ID, Name. What will be the better way to create a partition key?

DealZaap India
- 79
- 1
- 7
-1
votes
2 answers
Select item in cosmos without properties of container
When I run a select query ("Select top 1 * from c") on a container I get:
{
"id": "102",
"sid": "s-102",
"name": "Bena",
"grade": "2",
"_rid": "ruxSAIiGPgYCAAAAAAAAAA==",
"_self":…

rohini
- 1
- 5
-1
votes
1 answer
REST Api - JSON - "Cannot deserialize instance of object out of START_ARRAY token"
The issue in question is as follows:-
I have a POJO with a list of Apple objects , say applesList.
This is stored in Cosmos DB.
When applesList is null, the get endpoint works fine. I get the Pojo as is.
When applesList is populated with apples, i…

user1354825
- 1,108
- 4
- 21
- 54
-1
votes
1 answer
Handling DB query "IN" with a list of values exceeding DB capacity
I am querying a CosmosDB with a huge list of ids, and i get an exception saying i have exceeded the permissible limit of 256 characters.
What is the best way to handle such huge queries ?
The only way i can think of is to split the list and execute…

user1354825
- 1,108
- 4
- 21
- 54
-1
votes
1 answer
Issue with selecting the right partition key in CosmosDB SQLAPI
I'm using Azure Data Factory for copying required data from data lake to cosmos db.
On copying a sample size of 100, I see the run completed in ~5 min.
On copying a sample size of 1 million, I see the run completed in ~1 hour.
The throughput I set…

user989988
- 3,006
- 7
- 44
- 91
-1
votes
2 answers
Using array in headers in Invoke-RestMethod
I am trying to use Cosmos DB REST API using Invoke-RestMethod
method .My headers are as below
'Authorization' = $authToken
'x-ms-date' = $UTCTimeNow
'x-ms-version' = '2017-02-22'
'x-ms-documentdb-partitionkey' = @($partitonKey)
}
response…

Akshat
- 615
- 7
- 18
-1
votes
1 answer
Which of the Azure Cosmos DB types of database should I use to log simple events from my mobile application?
I would like to set up event logging for my application. Simple information such as date (YYYYMMDD), activity and appVersion. Later I would like to query this to give me some simple information such as how many times a certain activity occurred…

Alan2
- 23,493
- 79
- 256
- 450
-1
votes
1 answer
How to keep documents with 2 partition keys in sync / referential integrity?
I have a cosmos db with high cardinality synthetic partition keys and type properties.
I need a setup where users can share documents between them.
for example, this is a document:
{
“id”:”guid”,
“title”:”Example document to…

dee zg
- 13,793
- 10
- 42
- 82
-1
votes
1 answer
The remote server returned an error: (403) Forbidden. At C:\Program Files\WindowsPowerShell\Modules\CosmosDB\3.1.0.293\CosmosDB.psm1
I developed the PowerShell script for creating Database and Collection in the Azure Cosmos DB.
#region…

Pradeep
- 5,101
- 14
- 68
- 140
-1
votes
1 answer
Cosmos DB - Partition key for fixed collections
Can someone advise how to create Fixed collection (throughput - 400 RU) with logical partition keys? Is it possible?
It is necessary for me in order to migrate easily to unlimited collection in the future.
Thanks.

Taras
- 1
- 1
-1
votes
1 answer
Some nosql cosmosdb advice required
I am looking for some advice in designing an application using NoSQL CosmosDB or relevant technology.
The data structure looks like the following currently:
{
"accounts": [{
"name": "name1",
"type": "type1"
…

Martin
- 119
- 1
- 7