我正在开展物联网概念验证,通过物联网设备收集我想要在 Azure 中处理的信息。
简化我有 2 个表:
用户表
- 用户 ID(首次使用时通过设备上的 NFC 读取收集)
- 姓名(由用户在触摸屏上书写)
- 电子邮件
MagicTable
- UserID(当用户扫描他的设备时从设备上的 NFC 读取中收集 卡)
- 数据 1
- 数据 2
MagicTable 将接受分析和一些人工智能/预测。
我的设备已连接并通过 IoT 中心发送数据。我已经测试过将 MagicTable 发送到路径 IoTHub => StreamAnalytics => PowerBI,它工作完美,但我需要附加 UserTable 来加入 UserID。我的逻辑是用户表与流分析无关。我应该使用简单的 Azure SQL 表吗?我在哪里进行连接?
我的第一个目标是在 PowerBI 中呈现数据(其中名称与 MagicTable 中的数据相关联)。
最佳答案
您关于不使用流分析进行引用数据联接的假设是错误的。您可以在 Azure 流分析中进行加入。为了使其发挥作用,引用数据的变化应该缓慢。请参阅the docs
Reference data (also known as a lookup table) is a finite data set that is static or slowing changing in nature, used to perform a lookup or to correlate with your data stream...
不过,对于引用数据有一些要求,因此您应该确保它适用于您的情况:
Stream Analytics uses Azure Blob storage as the storage layer for Reference Data, and with Azure Data Factory reference data can be transformed and/or copied to Azure Blob storage, for use as Reference Data, from any number of cloud-based and on-premises data stores. Reference data is modeled as a sequence of blobs (defined in the input configuration) in ascending order of the date/time specified in the blob name. It only supports adding to the end of the sequence by using a date/time greater than the one specified by the last blob in the sequence.
如果您无法使用此功能,则必须使用单独的进程来连接数据。例如,您可以使用 azure 函数读取 IoT 中心数据,与那里的引用数据连接并输出到另一个事件中心 -> 流分析 -> power bi。
关于c# - Windows IoT、IoT Hub、流分析、Azure SQL、Power BI - 什么是正确的路径?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47374333/