Forum Discussion

tleamon's avatar
tleamon
New Member
8 years ago
Solved

Error streaming dataset flow with power BI

Hi Everyone,

 

I am trying out the real time streaming dataset but it doesnt seem to be working wrong. It appears that I am formatting the data wrong as it is returning:

 

{
    "error": {
        "code": "RealTime_PushRowsInvalidJson",
        "pbi.error": {
            "code": "RealTime_PushRowsInvalidJson",
            "parameters": {},
            "details": []
        }
    }
}

 

 

My data in powerbi dataset settings is:

[
{
"timestamp" :"AAAAA555555",
"temperature" :"AAAAA555555",
"humidity" :"2018-05-28T06:59:10.835Z"
}
]

And the data Im sending through a post is:

[ {`
“timestamp” : “2016-09-10T01:26:45.030Z”,
“temperature” : 98.6,
“humidity” : 98.6
} ]
  • Hi tleamon,

     

    Please refer to the snapshot below.

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

     

    Best Regards,

    Dale

5 Replies

  • v-jiascu-msft's avatar
    v-jiascu-msft
    Microsoft Employee

    Hi tleamon,

     

    If you didn't input the wrong settings here, maybe you need to change the settings.

    [
    {
    "timestamp" :"AAAAA555555",  <---should be date time
    "temperature" :"AAAAA555555",
    "humidity" :"2018-05-28T06:59:10.835Z"  <---should be number
    }
    ]

    I don't know which language you used. But the format seems wrong.

    1. The parentheses.

    2. The data should be in a Json format.

    The below is how I did with Python.

    push_url = "https://api.powerbi.com/***"
    for item in data_to_push:  # the data you posted
        data = json.dumps(item)  
        r = requests.post(push_url, data = data)
        print(str(data) + " pushed.")
        print(r.status_code)
        time.sleep(1)

    Error_streaming_dataset_flow_with_power_BI

     

    Best Regards,

    Dale

     

    • tleamon's avatar
      tleamon
      New Member

      Hello v-jiascu-msft,

       

      Thank you very much for the reply and I did not notice that I had a timestamp labeled as the wrong data type. Sadly this didnt fix my issue. I am actually just using Postman right now to send posts to the url. I have attatched a screenshot of the data I am trying to send as well as the way I have my realtime data item set up.

       

       

       

       

      • v-jiascu-msft's avatar
        v-jiascu-msft
        Microsoft Employee

        Hi tleamon,

         

        The error message shows the data is a invalid json data. Please try these two format below.

        {
        "timestamp" : "2016-09-10T01:26:45.030Z",
        "temperature" : 98.6,
        "humidity" : 98.6
        }
        "{
        "timestamp" : "2016-09-10T01:26:45.030Z",
        "temperature" : 98.6,
        "humidity" : 98.6
        }"

         

        Best Regards,

        Dale