我正在使用 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/