使用Stream Analytics JOB将数据推送到Azure Cosmos DB(如何设置Partiton Key IoT Hub) [英] Pushing Data to Azure Cosmos DB using Stream Analytics JOB ( how to set Partiton Key IoT Hub )

查看:66
本文介绍了使用Stream Analytics JOB将数据推送到Azure Cosmos DB(如何设置Partiton Key IoT Hub)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用Node JS SDK将遥测"推送到COSMOS DB.我有Edge设备,它将20台设备的遥测发送到Azure IoT,最终需要将其推送到Azure COSMOS DB.

I am Using Node JS SDK to push My Telemetry to COSMOS DB . I Have Edge Device which will send telemetry of 20 Devices to Azure IoT which Eventually need to push to Azure COSMOS DB . 

据我所知,虽然我有4个分区(将IoT中心的设备到云"设置为3)和我的流作业单元2和按devideId划分的cosmos DB分区(20个设备将有20个设备ID).

As I know though i have 4 partitions ( Device to Cloud for IoT hub set to 3 ) and my streaming Job Units 2 and cosmos DB partition by devideId ( 20 devices will have 20 device Id ) . 

有些实时数据库(例如COSMOS)说它已达到吞吐量限制(即使当我保持10000 Ru/s时),我也删除了自动索引,使其成为惰性索引,并且一致性级别也非常低.但是它无法将数据写入COSMOS 数据库.

Some how real time Database Like COSMOS says it has Reached throughput limit ( even when i Keep 10000 Ru/s ) , I have removed automatic Indexes made it Lazy Indexing and also very less consistency Level. yet it could not been able to write data to COSMOS DB. 

我看到,如果我们有并行作业将数据推送到COSMOS DB,那么它可能会增加吞吐量,并且可以增加吞吐量.

I saw that if we have parallel jobs pushing data to COSMOS DB then it might increase the through and we can increase throughput . 

https://docs.microsoft.com/zh-CN/azure/stream-analytics/stream-analytics-parallelization 

https://docs.microsoft.com/en-us/azure/stream-analytics/stream-analytics-parallelization 

  • IoT中心(需要使用PARTITION BY关键字显式设置分区键)  如何为Azure IoT中心显式设置分区密钥?

我无法理解Cosmos如何无法一秒钟写20条消息,肯定有我缺少的东西吗?每封邮件的大小均为4 KB,其中包含150个传感器.

I cant Understand how can Cosmos unable to write 20 messages at a seconds , there must be something i am missing ? Each message is og 4 KB and and has 150 sensors in it. 




推荐答案

不能为连接到Azure IOT Hub的每个设备设置分区键.这是由IoTHub管理的,并且是通过设计->看 分区

You cannot set the partition key for each device connected to Azure IOT Hub. That is managed by IoTHub and it is by design -> See Partitions 

如果您认为自己对Cosmos DB的消费有错误的警告,我们将需要从服务器端进行查看.能否请您提出支持请求@ https://aka.ms/azsupt并在说明中引用此问题?如果你这样做 没有访问支持计划的权限,请联系@ AZCommunity@microsoft.com,并提供此问题的链接以及您的订阅ID,我们可以帮助您打开此案例的支持记录.

If you believe that you are having a false warning of your consumption on Cosmos DB we will need to look at it from the server side. Can you please file a support request @ https://aka.ms/azsupt and reference this issue in the description? If you do not have access to a support plan, please reach out @ AZCommunity@microsoft.com with a link to this Issue as well as your subscription ID and we can help get the support ticket opened for this case.

谢谢!


这篇关于使用Stream Analytics JOB将数据推送到Azure Cosmos DB(如何设置Partiton Key IoT Hub)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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