消耗简单的字符串输入 [英] Consuming simple string input

查看:133
本文介绍了消耗简单的字符串输入的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在以以下格式将数据从传感器获取到我的IoT中心:

I'm getting data from sensors to my IoT Hub in the below format:

$ GPRP,083B6F936228,F0604BD6CAD7,-90,1EFF060001092002111EF6919DE8B42BA4849F0D1947151F4737314CC35F86

$GPRP,083B6F936228,F0604BD6CAD7,-90,1EFF060001092002111EF6919DE8B42BA4849F0D1947151F4737314CC35F86

BLE-WiFi网关从传感器获取数据,并通过MQTT发送到IoT中心.但是在流分析"作业中,我无法接受此数据作为CSV.不断出现序列化错误:

The BLE-WiFi gateway gets the data from the sensors and sends to IoT Hub via MQTT. But in my Streaming analytics Job, I'm not able to accept this data as CSV. Keeps on getting serialization error:

Could not deserialize the input event(s) from resource 'Partition: [2], Offset: [12897374080], SequenceNumber: [254913]' as Csv. Some possible reasons: 1) Malformed events 2) Input source configured with incorrect serialization format

该错误可能是由于缺少标题导致数据无效的CSV;但这就是我从传感器中得到的!

May be the error is due to missing headers which makes the data an invalid CSV; but this is what I get from the sensors!

无论如何,我是否可以告诉流分析工作将其视为简单的字符串?我可以在流分析中使用JavaScript UDF进行转换.

Is there anyway I could tell the streaming analytics job to just consider this as a simple string? I can do the conversions using JavaScript UDF's in the stream analytics.

推荐答案

您好,基兰,

不幸的是,目前,ASA要求带标题的CSV. UDF函数不能用于此目的.

Unfortunately, at this time, ASA requires CSV with headers. UDF function can't be used for this purpose.

如果您在IoT Edge上运行ASA,则可以使用我们的自定义解串器功能 在Ignite上宣布(可在私人预览中使用).

If you run ASA on IoT Edge, it is possible to use our custom deserializer feature announced at Ignite (available in private preview).

谢谢

JS


这篇关于消耗简单的字符串输入的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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