使用MongoDB API在CosmosDB中创建视图 [英] Creating views in CosmosDB using MongoDB API

查看:95
本文介绍了使用MongoDB API在CosmosDB中创建视图的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用MongoDB API创建视图。但是,所有创建的都是空集合。目前是否不支持视图(可能是因为聚合管道支持仍在预览中)?知道是否支持MongoDB
API的观点是在路线图上?


我的用例正在进行连接以创建视图,然后将其传递给PowerBI的CosmosDB Mongo用于显示数据的连接器。

解决方案

您是否启用了聚合?




聚合查询目前有40Mb内存限制,因此请确保运行较小的查询以测试功能(缩小查询范围) 。 


I'm trying to create a view using the MongoDB API. However, all that's being created is an empty collection. Are views currently not supported (maybe because the aggregation pipeline support is still in preview)? Any idea if support for views for the MongoDB API is on a roadmap?

My use case is doing a join to create a view, and then passing that to PowerBI's CosmosDB Mongo connector for presenting the data.

解决方案

Have you enabled Aggregation?

Azure #CosmosDB extends support for MongoDB aggregation pipeline, unique indexes, and more

Azure Cosmos DB’s API for MongoDB: supported features and syntax

There is currently a 40Mb memory limit on aggregation queries so make sure you are running smaller queries to test out the functionality (narrow the scope of the query). 


这篇关于使用MongoDB API在CosmosDB中创建视图的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆