0
votes

just wondering if i could get some help about azure iot hub and stream analytics. I'm using this guide to build my simulated device https://docs.microsoft.com/en-us/azure/iot-hub/quickstart-send-telemetry-python however, whenever i try to extend the json telemetry message to include more key pairs, stream analytics always gives me this error

Source '<unknown_location>' had 1 occurrences of kind 'InputDeserializerError.InvalidData' between processing times '2020-07-14T02:35:47.4125308Z' and '2020-07-14T02:35:47.4125308Z'. Could not deserialize the input event(s) from resource 'Partition: [2], Offset: [806016], SequenceNumber: [1698], DeviceId: [testdevicereal]' as Json. Some possible reasons: 1) Malformed events 2) Input source configured with incorrect serialization format

I've checked my json formatting and it seems fine, any clues?

1
take a look at what you're extending with and make sure it's valid json format. As-is, you haven't shown what the extended info looks like.ewong
Can you include the incoming telemetry message? Seeing as you're using Stream Analytics, you can go to the Query blade and check the Input preview window, switch it to raw and include the message in your question. A snippet of your code would also go a long way!Matthijs van der Veer

1 Answers

0
votes

Deserialization issues are caused when the input stream of your Stream Analytics job contains malformed messages. For example, a malformed message could be caused by a missing parenthesis, or brace, in a JSON object or an incorrect timestamp format in the time field.

Enable resource logs to view the details of the error and the message (payload) that caused the error. There are multiple reasons why deserialization errors can occur. For more information regarding specific deserialization errors, see Input data errors. If resource logs are not enabled, a brief notification will be available in the Azure portal.

Please see Troubleshoot input connections for more details.