gpt4 book ai didi

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

转载 作者:行者123 更新时间:2023-12-02 16:58:23 25 4
gpt4 key购买 nike

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

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com