question

87035596 avatar image
0 Votes"
87035596 asked ·

try to route data to power bi from iot hub

Want to route data from IoT hub to power BI to visualization , but when create ASA job do not read any input data from hub and show this error : 77786-image.png
[No data was found for preview from 'input'. Make sure the input has recently received data and the correct format of those events has been selected. ]
although the device send data and roued to blob storage through hub !!

azure-iot-hubazure-iot-edgeazure-iotazure-iot-sdk
image.png (22.7 KiB)
· 1
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @AhmedAssad-8581 Just checking in if you have had a chance to see the previous response.
If the below response is helpful, please click "Accept Answer" and upvote it.

0 Votes 0 ·

1 Answer

SatishBoddu-MSFT avatar image
1 Vote"
SatishBoddu-MSFT answered ·

Hello @AhmedAssad-8581 I hope you may find the below steps to address your query issue.

Content: Tutorial - View Azure IoT Hub message routing results (.NET)

Step 1: Update your code to send the telemetry in the UTF8 encoded , .JSON format.
It looks like the issue is with the encoding of the telemetry message sent.

I have modified my C# code to send the encoded message as utf-8 instead of utf-32.
Below are the properties I have used. Please try these in your code as well.

 message.ContentEncoding = "utf-8";
 message.ContentType = "application/json";

image



So when you read the telemetry messages from any tool, such as VS code or Device explorer, you will see the below format telemetry .

 [{"deviceId":"Contoso-Test-Device","temperature":21.319264327790247,"humidity":68.288192045077778,"pointInfo":"This is a normal message."}]Properties:
 'level': 'normal'


Step 2: Provide the right info in the ASA job , Input

image

Step 3: Check the Dataset created in the PowerBi app.

image

Finally, I was able to create a PowerBi report with the Dataset

77935-image.png

We will work with our team to see if can fix this sample code file and instructions on ASA Job Input settings.

Please let us know If you need further help in this matter.

Same issue was addressed few days back on Github:

If the response is helpful, please click "Accept Answer" and upvote it.



image.png (37.0 KiB)
image.png (30.3 KiB)
image.png (16.7 KiB)
image.png (285.2 KiB)
· 4 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @AhmedAssad-8581 If the above response is helpful, please click "Accept Answer" and upvote it.

0 Votes 0 ·

Sorry for delay , i have a physical devices that generate messages with json format . And data received by iot hub in json but the output is AVRO format , So i tried to use AVRO format as ASA input and other one with json format and same error that i get it ... !!

0 Votes 0 ·

You can use the JSON format and please try the workaround which I have mentioned as part of the code change. let us know If that worked!

0 Votes 0 ·
87035596 avatar image 87035596 SatishBoddu-MSFT ·

i am already try JSON and AVRO and get same error , although i am sure that format of input is json but data after pass through iot hub changed to Avro and do not be accessed to ASA job
although i tried to deploy whole system with different iot hub in other region ... and same error

0 Votes 0 ·