azure-cosmosdb

Paging Backwards in Cosmos DB

你离开我真会死。 提交于 2021-01-27 20:25:45
问题 I'm trying to implement a simple paging system with c# and cosmos on my Vue front end, but i'm not really sure the best way to implement a the paging when the user wants to go back. For going forward i'm using the continuation token, so cosmos know where i have got up to, but i'm not really sure on the best way to work this going backwards, or if the user goes from page 1 to 3, then back to page 2? Will i have to cache the results as the user pages through the items, or is there another way

Storing over 500 k + images as varbinaryblob on Azure BLOB or CosmosDB?

柔情痞子 提交于 2021-01-27 20:04:18
问题 I work on UWP app that downloads images from Azure . Although the size of image in < 2 MB , their number is over 500 k. Currently the images are stored in Azure SQL as varbinary .This is consuming 250 GB on the database instance.We need to move it to non relational data storage that has less latency , consumes less space in storage. Which option here (Azure BLOB or Cosmos DB) fits better.? We download the images from REST API connecting to Azure SQL right now using a unique key and want to

Cosmos DB Array Query Doesn't Work in .NET SDK

放肆的年华 提交于 2021-01-27 19:03:34
问题 I'm attempting to get all distinct category values used in a container, where categories is an array of strings. Looking at the Cosmos DB SQL docs, I've constructed the following query which works in the Emulator when I execute the SQL and returns an array of distinct categories as expected. SELECT DISTINCT * FROM c IN s.categories Results in [ "Running", "Rugby", "Icon" ] However, if I use the same query via the Cosmos .NET SDK I get an error "Identifier 'session' could not be resolved." Why

Azure ARM templates : DocumentDB primaryMasterKey as OUTPUT

一曲冷凌霜 提交于 2021-01-27 13:46:11
问题 In a Azure ARM templates I'm having some problems trying to extract in the OUTPUT section the 'primaryMasterKey' of a DocumentDB created in the RESOURCES section. The deploy reports this error : The template output 'documentDbPrimaryMasterKey' is not valid: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.. (Code: DeploymentOutputEvaluationFailed) The definition of that OUTPUT is : "documentDbPrimaryMasterKey": { "type": "object", "value": "

Cosmodb reply message length error performing a find using the mongo java driver

折月煮酒 提交于 2021-01-27 04:07:12
问题 Using the Mongo Java Driver version 3.4.2 Trying to perform a find query on a collection that contains around 700 documents has started throwing the following exception. This did not happen when the collection was smaller. The limits look to be set during the connection process. ! com.mongodb.MongoInternalException: The reply message length 4812632 is less than the maximum message length 4194304 ! at com.mongodb.connection.ReplyHeader.<init>(ReplyHeader.java:74) ! at com.mongodb.connection

High demand on Azure Cosmos DB Emulator when adding a new collection

时光毁灭记忆、已成空白 提交于 2021-01-27 04:06:58
问题 When I'm trying to add a new collection to database I'm getting this error : Failed to create collection 'Products'. Error: Sorry, we are currently experiencing high demand in this region, and cannot fulfill your request at this time. We work continuously to bring more and more capacity online, and encourage you to try again. Please do not hesitate to email docdbswat@microsoft.com at any time or for any reason. ActivityId: bad1a40a-0000-0000-0000-000000000000, Microsoft.Azure.Documents.Common

High demand on Azure Cosmos DB Emulator when adding a new collection

痴心易碎 提交于 2021-01-27 04:06:03
问题 When I'm trying to add a new collection to database I'm getting this error : Failed to create collection 'Products'. Error: Sorry, we are currently experiencing high demand in this region, and cannot fulfill your request at this time. We work continuously to bring more and more capacity online, and encourage you to try again. Please do not hesitate to email docdbswat@microsoft.com at any time or for any reason. ActivityId: bad1a40a-0000-0000-0000-000000000000, Microsoft.Azure.Documents.Common

High demand on Azure Cosmos DB Emulator when adding a new collection

房东的猫 提交于 2021-01-27 04:04:14
问题 When I'm trying to add a new collection to database I'm getting this error : Failed to create collection 'Products'. Error: Sorry, we are currently experiencing high demand in this region, and cannot fulfill your request at this time. We work continuously to bring more and more capacity online, and encourage you to try again. Please do not hesitate to email docdbswat@microsoft.com at any time or for any reason. ActivityId: bad1a40a-0000-0000-0000-000000000000, Microsoft.Azure.Documents.Common

Cannot delete item from CosmosDB

北慕城南 提交于 2021-01-20 08:19:07
问题 I am trying to use an Azure Functions httpTrigger call to delete an item from my database. import { CosmosClient, } from '@azure/cosmos' const httpTrigger: AzureFunction = async function (context: Context, req: HttpRequest): Promise<void> { const client = new CosmosClient(process.env.cosmosDB) const database = client.database('testDB'); const container = database.container('workers'); const item = container.item('28a31558-ff8c-40c3-a7e8-1e8904c5ff72', '/id') console.log(await item.delete()) }

Migrating data from old container to new partitioned container using change feed

☆樱花仙子☆ 提交于 2021-01-07 06:42:42
问题 1.Is using azure cosmosdb changefeed right approach, to migrate data from old containers to new partitioned containers? 2.Will azure cosmosdb changefeed have documents which are not at all modified even once till now? 3.If above are true, what are the steps involved in migrating data using azure cosmosdb change feed. 回答1: You can certainly use Change Feed to achieve all this. Cosmos DB has several options to consume the Change Feed, one of them is using Azure Functions. If you go with the