try to route data to power bi from iot hub

Ahmed Assad 266 Reputation points
2021-03-15T11:40:39.43+00:00

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
Azure IoT
A category of Azure services for internet of things devices.
382 questions
Azure IoT Edge
Azure IoT Edge
An Azure service that is used to deploy cloud workloads to run on internet of things (IoT) edge devices via standard containers.
541 questions
Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,124 questions
Azure IoT SDK
Azure IoT SDK
An Azure software development kit that facilitates building applications that connect to Azure IoT services.
208 questions
{count} votes

1 answer

Sort by: Most helpful
  1. QuantumCache 20,031 Reputation points
    2021-03-15T21:55:36.473+00:00

    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.

    1 person found this answer helpful.