azure-cosmosdb

Class inheritance in DocumentDb

好久不见. 提交于 2019-12-11 12:34:46
问题 I am trying to figure out best way to model class inheritance in DocumentDb. Say my classes are structured as class A property X property Y property Z class B inherits from A property W Is there a built in support to hand this? If I use Lambda expressions in my client code, will it be able to distinguish b/w the types automatically? Will following query only bring objects of type B back? Or will it also consider instances of base class A? var bCollection = from o in client.CreateDocumentQuery

How do I get UNIQUE categories from all documents in CosmosDB?

做~自己de王妃 提交于 2019-12-11 11:26:57
问题 I have millions of documents in CosmosDB using SQL API, and I need to find the unique categories from all documents. The documents looks like follows, you can see the categories array just under the description, I dont care in what order they are I just need to know all the unique ones from all documents in the collection, I need this so that later on I can create queries on the categories but thats a later question I first need to get them all out so I know what all the possible options are,

How to store UserState and ConversationState in Azure Cosmos DB (BotFramework)?

*爱你&永不变心* 提交于 2019-12-11 10:09:48
问题 I'm doing a bot with de Microsoft Bot Framework version V4. The documentation is really awful, and I'm having problems with Cosmos DB (Azure) when I try to store de UserSate and the ConversationState. I tried every result in Google but nothing has worked yet. Plus, there no much information about the framework really. Bellow is the code of the file Startup.cs. public void ConfigureServices(IServiceCollection services) { services.AddBot<SeguritoBot>(options => { var secretKey = Configuration

sub partitioning or composite partitioning document db

社会主义新天地 提交于 2019-12-11 10:03:04
问题 In one article of msdn, https://azure.microsoft.com/en-in/documentation/articles/documentdb-partition-data/, there is a line which specifies that "sub-partitioning" or "complex partitioning" can be done. Does this mean : There can be sub-partitioning inside a collection? In a single DocumentDb, there can be more than one partitioning logic? For example, I will have four collections inside a single Document Db. Can two of them can be based on hash and the other two on range? If either of those

Comparison between Azure SQL cost vs DocumentDB/CosmosDB cost

情到浓时终转凉″ 提交于 2019-12-11 09:23:57
问题 Did anyone run any comparison between Azure SQL cost vs DocumentDB/CosmosDB cost? The RU that's presented in the Azure CosmosDB cost is not clear to me. E.g., 1 request in 1 TB db cannot be equal with 1 request in 1 GB db. 回答1: First, you cannot reliably generalize a comparison of cost between relational Azure SQL cost and NoSQL CosmosDB cost, because they are significantly different things. They are not interchangeable, they would require different data modelling depending on planned usage

Group Parent Vertex and Children through Edges into master/sub json array

对着背影说爱祢 提交于 2019-12-11 09:22:25
问题 First of i am using azure cosmos db. A person works_for multiple Offices. Each Office can be IsMaster or not. If it is a IsMaster it can have master_of edge to another Office. Each works_for edge has AccessLevel property for a person. Logic: Given a Person name, get all Offices that person works_for that are IsMaster = 'true'. Then return all IsMaster with AccessLevel taken from works_for and corresponding SubOffices that each IsMaster has through master_of edge and corresponding AccessLevel

Azure Stream Analytics is not feeding DocumentDB output sink

老子叫甜甜 提交于 2019-12-11 08:00:52
问题 I am trying to integrate Azure Stream Analytics with DocumentDB and use it as a output sink. Problem is, that there are no documents created in DocDB when the processing job is running. I tried to test my query and I have even tried to mirror the output to storage account. There is json file being created in the storage containing all the values, but DocDB stays empty. Here is my query: WITH Res1 AS ( SELECT id, concat( cast( datepart(yyyy,timestamp) as nvarchar(max)), '-', cast( datepart(mm

DocumentDB Emulator browser issues

巧了我就是萌 提交于 2019-12-11 08:00:03
问题 I'm running Windows 10 - 1703 build 15063.296 - using Edge with Azure Cosmos DB Emulator, the UI tabs on the quick start page don't work? is anyone having the same issue? BTW, the Azure portal works fine. 回答1: using Edge with Azure Cosmos DB Emulator, the UI tabs on the quick start page don't work? If you mean that you could not choose other platforms except .NET in Quickstart page, you could try to uninstall and reinstall the Azure Cosmos DB Emulator, the issue seems fixed now. 回答2: I think

Problems inserting document with Mongodb and Logic Apps

扶醉桌前 提交于 2019-12-11 07:57:54
问题 My logic app collects data from an api rest and inserts into a cosmosdb mongodb. The process occurs successfully, but when performing a query using Data Explorer the following error occurs: Error while fetching page of documents: {"code":400,"body":"Command find failed: Unknown server error occurred when processing this request."} Here is an example of a call that reproduces the error: "Create_or_update_document": { "inputs": { "body": { "id": "11111", "name": "john", "surname": "doe" },

Cosmos DB + pyDocumentDB + Databricks

一曲冷凌霜 提交于 2019-12-11 07:37:15
问题 I've got a strange behaviour with pyDocumentDB and Databricks with Cosmos DB . I'm trying to query a collection, connection goes well, but I'm having a little troubles fetching results. If I query in a "general" way I obtain results... But when I try to fetch, for example, the 'source' field inside the 'tweet' I obtain only an empty result I queried for collection 'structure' and check the path to the 'source' field. The field exists I've check all possible path combinations in the SELECT