Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

How to format json data for PowerBI (Error: “Additional characters were found at the end of the JSON

Hello. I am sending data from Node-RED to the Azure Blob Storage and use the Storage Account as a Data Source for Power BI. The messages that arrive to Node-RED are being saved in a json file (every day), which will be uploaded to the cloud at the end of the day. I have a problem with the format of these messages because I get this error when I try to edit the data in Power BI:

Details: "Additional characters were found at the end of the JSON entry."

Unfortunately I am inexperienced in this topic and don't know how to fix it.
These are the messages in my file:

{"timestamp": "2019-05-11T22:39:13.908347", "current_ma": 22, "voltage_mv": 229979, "energy_wh": 15, "power_mw": 0}
{"timestamp": "2019-05-11T22:39:18.843627", "current_ma": 22, "voltage_mv": 230069, "energy_wh": 15, "power_mw": 0}
{"timestamp": "2019-05-11T22:39:23.935679", "current_ma": 22, "voltage_mv": 229988, "energy_wh": 15, "power_mw": 0}
{"timestamp": "2019-05-11T22:39:28.865907", "current_ma": 21, "voltage_mv": 230048, "energy_wh": 15, "power_mw": 0}
{"timestamp": "2019-05-11T22:39:33.810613", "current_ma": 21, "voltage_mv": 230081, "energy_wh": 15, "power_mw": 0}

I used to have each one of these messages in one file but it was taking too much space, so I am guessing the problem has something to do with joining all the messages in one file. Maybe the separation between them?

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

By my tests and research, this error should be caused by your incorrect json format.

Please correct your json format.

By my test, if you mofify your json format like below, we could import the json file successfully.

[
   {
      "timestamp":"2019-05-11T22:39:13.908347",
      "current_ma":22,
      "voltage_mv":229979,
      "energy_wh":15,
      "power_mw":0
   },
   {
      "timestamp":"2019-05-11T22:39:18.843627",
      "current_ma":22,
      "voltage_mv":230069,
      "energy_wh":15,
      "power_mw":0
   },
   {
      "timestamp":"2019-05-11T22:39:23.935679",
      "current_ma":22,
      "voltage_mv":229988,
      "energy_wh":15,
      "power_mw":0
   },
   {
      "timestamp":"2019-05-11T22:39:28.865907",
      "current_ma":21,
      "voltage_mv":230048,
      "energy_wh":15,
      "power_mw":0
   },
   {
      "timestamp":"2019-05-11T22:39:33.810613",
      "current_ma":21,
      "voltage_mv":230081,
      "energy_wh":15,
      "power_mw":0
   }
]

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
carlacl9
Regular Visitor

Hello, I have the same problem I have an adf that automatically saved in my container Azure Blob Storage which use it as a source of data for power bi, the information in my adf are saved in JSON format every time you run a pipeline, when I try to get the data in power bi I get this error

 
 
 
 

image.png

one of the options i tried was transforming it to text and then to json but i keep getting this message:

image.png

I hope you can help me.

Thank you

v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

Have you solved your problem?

If you have solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.

If you still need help, please feel free to ask.

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hello, I have the same problem I have an adf that automatically saved in my container Azure Blob Storage which use it as a source of data for power bi, the information in my adf are saved in JSON format every time you run a pipeline, when I try to get the data in power bi I get this error

 
 
 
 

image.png

one of the options i tried was transforming it to text and then to json but i keep getting this message:

 

image.png

I hope you can help me.

Thank you

v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @Anonymous ,

By my tests and research, this error should be caused by your incorrect json format.

Please correct your json format.

By my test, if you mofify your json format like below, we could import the json file successfully.

[
   {
      "timestamp":"2019-05-11T22:39:13.908347",
      "current_ma":22,
      "voltage_mv":229979,
      "energy_wh":15,
      "power_mw":0
   },
   {
      "timestamp":"2019-05-11T22:39:18.843627",
      "current_ma":22,
      "voltage_mv":230069,
      "energy_wh":15,
      "power_mw":0
   },
   {
      "timestamp":"2019-05-11T22:39:23.935679",
      "current_ma":22,
      "voltage_mv":229988,
      "energy_wh":15,
      "power_mw":0
   },
   {
      "timestamp":"2019-05-11T22:39:28.865907",
      "current_ma":21,
      "voltage_mv":230048,
      "energy_wh":15,
      "power_mw":0
   },
   {
      "timestamp":"2019-05-11T22:39:33.810613",
      "current_ma":21,
      "voltage_mv":230081,
      "energy_wh":15,
      "power_mw":0
   }
]

Best  Regards,

Cherry

 

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors