Questions tagged [azure-cosmosdb-sqlapi]

1222 questions
3
votes
2 answers

Microsoft.Azure.Cosmos.Client: Response status code does not indicate success: ServiceUnavailable (503)

I am trying to add new items into the cosmos db using my local settings. This is my code to insert bulk: private async Task AddSubscription(EnableOrDisableSubscriptionCommand command, SubscriptionAction subscriptionAction, IList
Rakesh Kumar
  • 2,701
  • 9
  • 38
  • 66
3
votes
1 answer

Does CosmosDb SDK v3 automatically retry while inserting in bulk?

I'm new to CosmosDB and I'm trying to grasp the R/U's settings limits. Situation Within an ASP.NET Core 2.1 application, I want to insert +/- 3000 documents at once. Looping these items and adding them one by one takes minutes of time. So bulk might…
3
votes
1 answer

How to provide custom ObjectMapper to cosmos client in java azure-cosmos sdk 4?

cosmos java sdk com.azure azure-cosmos 4.1.0 We want to use custom date format while serialization of POJO to JSON, Currently it is converting to…
pvjhs
  • 549
  • 1
  • 9
  • 24
3
votes
1 answer

The connection string is missing a required property: AccountEndpoint error while using the new CosmosClient(CosmosConnectionString)

I am getting The connection string is missing a required property: AccountEndpoint error while using the new CosmosClient(CosmosConnectionString) constructor for CosmosClient with assembly Microsoft.Azure.Cosmos.Client, Version=3.11.0.0 - How to fix…
3
votes
0 answers

When to create multiple containers in Azure Cosmos db

I am creating multiple micro service APIs. Can we use one single Container to store all the different schemas from the different APIs? If so how to differentiate the schemas while retrieving documents? When to create multiple containers in Azure…
John
  • 71
  • 3
3
votes
3 answers

Azure Cosmos DB - 'Request rate is large. More Request Units may be needed' error while deleting the items

I am using below stored procedure to delete items from cosmos db collection. function bulkDeleteStoredProcedure(query) { var collection = getContext().getCollection(); var collectionLink = collection.getSelfLink(); var response =…
Rakesh Kumar
  • 2,701
  • 9
  • 38
  • 66
3
votes
2 answers

Why does Azure Cosmos DB (SQL API) take so long to deploy via ARM template?

Why does Azure Cosmos DB take so long to deploy? When I tried deploying Azure Cosmos DB (SQL API) via ARM template, it took ~20 min for deployment to complete. Why is that?
3
votes
1 answer

How do I define unique keys involving properties in embedded arrays in Azure Cosmos DB?

In Azure Cosmos DB, there is support for unique keys. Each unique key is defined as a set of paths representing values in the stored documents. An example of such a path would be /contact/firstName. It's not clear from the official docs (in fact…
Daniel Rosenberg
  • 616
  • 5
  • 14
3
votes
1 answer

How to do revert or rollback of an update in CosmosDB?

I'm doing an upsert of a JSON document in Azure CosmosDB SQL API as part of a transaction. I'm using the SDK Microsoft.Azure.DocumentDB.Core. I also have another SQL Server update which takes place in the same transaction scope (not .NET transaction…
wonderful world
  • 10,969
  • 20
  • 97
  • 194
3
votes
3 answers

CosmosDB + group by

I need to use "GROUP BY" clause on Azure Data Explorer but I think it is unsupported. Someone have any idea to solve or avoid group by? Best regards,
pefs
  • 59
  • 1
  • 4
3
votes
1 answer

CompositeToken in new Microsoft.Azure.Cosmos SDK

I'm migrating from the Microsoft.Azure.DocumentDB.Core SDK to the new Microsoft.Azure.Cosmos SDK (version 3.2). The older SDK returns the ContinuationToken in the ResponseContinuation property and looks like this:…
INNVTV
  • 3,155
  • 7
  • 37
  • 71
3
votes
0 answers

How to do bulk insertion in cosmosDB using python SQL api

I want to do bulk insert in CosmosDB collections. But bulk insertion library is only available for .NET and Java. I found another alternative as StoredProcedure but in that also I have to store using for loop. sproc = { 'id':…
3
votes
1 answer

Cosmos Stored Procedure - console.log issue

I'm new to Cosmos DB stored procedure. As introduced, cosmos stored procedure is written with Javascript, and it's unable to debug by setting up the break point, so we'll have to use console.log(...) to watch element content inside the stored…
Drex
  • 3,346
  • 9
  • 33
  • 58
3
votes
1 answer

How to connect MS Excel to Azure Cosmos DB-SQLAPI?

I need to create an Excel table who can query the Database and interpret the data into styled tables so the users can understand it. It's supposed to be able to query the whole server and put the outputs into precise columns, even if they come from…
3
votes
1 answer

Can I get the count of all records in a Cosmos DB table for a large amount of records?

Assuming I have approximately 10 million documents in a Cosmos DB SQL table, or 10 million collections in a Cosmos DB Cassandra table, is there any way to view the amount of documents/collections in those tables?