azure-cosmosdb

DocumentDb - Query that expects full results from aggregate functions is not supported

不打扰是莪最后的温柔 提交于 2019-12-25 11:06:41
问题 When I issue a linq count against DocumentDb. The first POST web request results in a 400 Bad request Request json: {"query":"SELECT VALUE Count(1) FROM root WHERE ((((root[\"docType\"] = \"Whatever\") AND (root[\"field1\"] = false)) AND (root[\"field2\"] = true)) AND (root[\"field3\"] = 1)) "} Message: Query that expects full results from aggregate functions is not supported This is followed by a GET partition key ranges. Then another POST web request for the count query which works: Request

DocumentDb - Query that expects full results from aggregate functions is not supported

大城市里の小女人 提交于 2019-12-25 11:06:12
问题 When I issue a linq count against DocumentDb. The first POST web request results in a 400 Bad request Request json: {"query":"SELECT VALUE Count(1) FROM root WHERE ((((root[\"docType\"] = \"Whatever\") AND (root[\"field1\"] = false)) AND (root[\"field2\"] = true)) AND (root[\"field3\"] = 1)) "} Message: Query that expects full results from aggregate functions is not supported This is followed by a GET partition key ranges. Then another POST web request for the count query which works: Request

Getting error in Azure Stream Analytics with DocumentDB as sink

早过忘川 提交于 2019-12-25 08:46:49
问题 I'm using Azure Stream Analytics to stream events from Event Hubs to DocumentDB. I have configured the input , query and output as documented, tested it with sample data and it managed to return results as expected. But when I start the streaming job and send the same payload as the sample data earlier, I got this error message: There was a problem formatting the document [id] column as per DocumentDB constraints for DocumentDB db:[my-database-name], and collection:[my-collection-name]. My

Delete a row from mongodb database in azure

前提是你 提交于 2019-12-25 04:57:21
问题 I am an azure newbie who has a mongodb database on Azure cloud storage. I am trying to delete a row with a specific value from the Query explorer in Azure, but I keep getting this error. Am I missing something? delete from users where _id='...' doesnt work neither does delete * from users where _id='' work this works perfectly even if am doing SQL on a mongodb database while querying 回答1: I think you are using Microsoft DocumentDB (not mongoDB). DocumentDB is available on Azure and supports

DocumentDB find deep key:value

你。 提交于 2019-12-25 03:32:47
问题 in MongoDB I can perform a find on any deep level key like collection.find('persons.age': 12) Is a similar thing possible with document DB? I have tried something like the following which fails with: code":"BadRequest" - could not be resolved. query: "SELECT * FROM root WHERE person.age = 12" 回答1: You must reference the collection from the FROM clause. Note: Since you are issuing queries directly to a collection, you can use any arbitrary value for the name. However, you must re-use whatever

The remote server returned an error: (400) Bad Request. At C:\Program Files\WindowsPowerShell\Modules\CosmosDB\3.1.0.293\CosmosDB.psm1

巧了我就是萌 提交于 2019-12-25 02:53:54
问题 I have a PowerShell script for creating database and collection inside Azure Cosmos DB. I am trying to insert some dummy records inside collection by using the below PowerShell script. #region Parameters $clientId= "XXXXXXXXXXXXXXX" $clientSecret= "XXXXXXXXXXXX=" $subscriptionName= "XXXXXXXXXXXXXXX" $tenantId= "XXXXXXXXXXXXXXXX" $resourceGroupName= "Demo" $connectionString='XXXXXXXXXXXXXXXXx==' $cosmosDBAccounts= @('demo-account-01') $databaseName='demo-db-01' $collectionName='demo-collection

Save conversation history from MS bot to cosmos db

放肆的年华 提交于 2019-12-25 02:44:35
问题 The bot I'm developing is a replacement for a contact form for potential clients that want to be contacted by a company, so the user inputs have to be saved in a database. I have successfully connected a Cosmos DB to my bot which collect the state data when the bot is used. I have a dialog stack with one dialog per user input (Name, email and the message the user want to leave). I can't find any helpful documentation on how to save conversation history for bots written in C#. Can anyone help

Azure function inserting but not updating cosmosDB

☆樱花仙子☆ 提交于 2019-12-25 02:12:31
问题 I have an azure function taking in messages from an Azure service bus queue and sending documents to cosmosDB. I'm using Azure functions 1.x: public static class Function1 { [FunctionName("Function1")] public static void Run([ServiceBusTrigger("ServiceBusQueue", AccessRights.Manage, Connection = "ServiceBusQueueConnection")]BrokeredMessage current, [DocumentDB( databaseName: "DBname", collectionName: "Colname", ConnectionStringSetting = "CosmosDBConnection")]out dynamic document, TraceWriter

I can't connect my ASP .NET app from Docker-container to my computer host database with “host.docker.internal:some-port”

醉酒当歌 提交于 2019-12-25 01:38:12
问题 I lost amount of time trying to connect my app container with my database Azure Cosmos DB Emulator. I am using loggers object to know where my app break, and I found that the problem is in the connection of the container out of him. I tried to use the famous host.docker.internal direction to connect my host but using my container name (the public IP and DNS internal server of docker). Here is my appsettings.Development configuration: "DocumentDb": { "TenantKey": "Default", "Endpoint": "https:

Cosmos DB partitioned access to a database

偶尔善良 提交于 2019-12-25 00:39:27
问题 I am implementing a multi-tenant application using cosmosDB. I am using partition keys to separate multiple users data. Following best practices i am trying to allow each tenant to have its own db access token. I create a user and permission and use the created token to access the partition. But I get the following error: Partition key provided either doesn't correspond to definition in the collection or doesn't match partition key field values specified in the document. ActivityId: 1659037a