How to ingest dynamic data to ADX?

jane 40 Reputation points

I am connecting to Azure IoT Hub through Azure Data Explorer (ADX) to get JSON-formatted streaming data. However, this JSON is in a nested format, and the fields of the nested objects are not fixed. How can I flatten and store it in ADX?

The JSON data like follows:



"recordTime":"2023-11-09 11:09:21",





And the apple may have more property.I want store it in a table on ADX like follows: apple: type,recordTime,weight,price,...

Azure IoT Hub
Azure IoT Hub
An Azure service that enables bidirectional communication between internet of things (IoT) devices and applications.
1,011 questions
Azure Data Explorer
Azure Data Explorer
An Azure data analytics service for real-time analysis on large volumes of data streaming from sources including applications, websites, and internet of things devices.
428 questions
0 comments No comments
{count} votes

Accepted answer
  1. Sander van de Velde 25,416 Reputation points MVP

    Hello @jane,

    welcome to this moderated Azure community forum.

    When ingesting data from an IoT Hub, you need to create a mapping for the data connection. Check out this blog post for an example.

    Is this message mapped to a dynamic column names like 'data'?

    In that case, you can access the weight:

    | project weight =

    If you want to map it directly to a typed column, you need to check the mapping like:

    '{"Column": "weight", "Properties": {"Path": "$.apple. Weight"}},'

    Please check out that article for a full story.

    If the response helped, do "Accept Answer". If it doesn't work, please let us know the progress. All community members with similar issues will benefit by doing so. Your contribution is highly appreciated.

0 additional answers

Sort by: Most helpful