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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
her_abs
Regular Visitor

How to add data to Power BI from newline delimited JSON file in blob storage?

I have telemetery data from KEPServerEX's MQTT client being published to the IoT Hub. This data is then queried in stream analytics to create individual JSON values from each message which can have up to 1000 individual tag values per message. My query in stream analytics is:


<start code>

SELECT
    event.timestamp as messageTS,
    val.ArrayValue.id,
    val.ArrayValue.v,
    val.ArrayValue.t as valueTS
INTO blobstorage
FROM
    mqtt AS event
CROSS APPLY GetArrayElements(event.[values]) AS val
</end code>

 

This provides a very nicely individually formatted JSON message like:
{"messageTS":1576108485408,"id":"example_Tag","v":910,"valueTS":1576108481860}

 

My blob storage is filled with these messages. Although they are properly formatted JSON message by themselves, they are part of a newline deliminted JSON file in my blob container (http://ndjson.org/).

 

How can I get these records into Power BI such that they were a complete list (i.e. had brackets on each end and were deliminted by commas)?

1 ACCEPTED SOLUTION
v-yuta-msft
Community Support
Community Support

@her_abs ,

 

I would suggest you to refer to similar thread below:

https://community.powerbi.com/t5/Power-Query/Change-JSON-Blob-data-during-import/td-p/32121

 

Community Support Team _ Jimmy Tao

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

1 REPLY 1
v-yuta-msft
Community Support
Community Support

@her_abs ,

 

I would suggest you to refer to similar thread below:

https://community.powerbi.com/t5/Power-Query/Change-JSON-Blob-data-during-import/td-p/32121

 

Community Support Team _ Jimmy Tao

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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