c# - 如何在 Eventhub 上以 CSV 形式发送数据以进行 Azure 流分析?

标签 c# azure azure-eventhub azure-stream-analytics

我正在使用 Azure 流分析,我的输入是 Eventhub,事件序列化格式是 CSV,分隔符是逗号 (,)。我的查询是从输入中选择 DeviceId、温度,我的输出是 sql 数据库。 但是当我的工作运行时,它给了我类似

的错误

"After deserialization, 0 rows have been found. If this is not expected, possible reasons could be a missing header or malformed CSV input"

和 第二个错误是

Could not deserialize the input event as Csv. Some possible reasons:

1) Malformed events

2) Input source configured with incorrect serialization format..

我正在像这样在 Eventhub 上发送数据

string messageBody1 = "DeviceID:20," + "Temperature:30";
ClientHelper.SendMessage(messageBody1).Wait();

最佳答案

您当前的 CSV 格式错误,因为您需要在第一行指定列名称并在以下几行中指定相关值:

DeviceID,Temperature
20,30

保罗

关于c# - 如何在 Eventhub 上以 CSV 形式发送数据以进行 Azure 流分析?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30868467/

相关文章:

Azure 使用 Terraform 将安全组与多个网络接口(interface)和负载均衡器与多个子网关联

Azure 插槽交换作业处理器失败 : Cannot swap slots for site because the worker process in slot aborted the warmup request

用于 Kafka 的 Azure 事件中心,具有来自同一组的 2 个消费者无限重新平衡

azure - GPRS 设备和 Azure IOT 中心问题

c# - 如何调试 Azure EventHub?

c# - LINQ - 遍历二维数组的行

c# - Gmail 错误 :The SMTP server requires a secure connection or the client was not authenticated. 服务器响应为 : 5. 5.1 需要身份验证

c# - 带有 LUIS 的 Microsoft Bot 框架

c# - 将“显示全部”按钮添加到正在填充的复选框列表中

ios - 如何在 iOS 客户端中解码来自 SimpleMembership 的哈希字符串?