Json parsing using stream analytics

SaurabhShukla 101 Reputation points
2023-01-05T19:11:45.85+00:00

Hi Team,

I am using stream analytics to parse json object and I need to remove some of the columns and rename remaining columns from json object.
Please find below input data and output data needed.

Input Data:
[
{
"timestamp": 1672920559822,
"values": [
{
"id": "CHANNEL1.DEVICE1.TAG1",
"v": 7157,
"q": true,
"t": 1672920550218
},
{
"id": "CHANNEL2.DEVICE2.TAG2",
"v": 7158,
"q": true,
"t": 1672920550218
}
]
}
]

Output Data :
276598-image.png

I am able to get sensor id and timestamp with the query but unable to create telemetry column with required information.
Could you please help me with the query how to fetch the details from input stream Values and convert it to required output.

Would be highly appriciated.

Azure Stream Analytics
Azure Stream Analytics
An Azure real-time analytics service designed for mission-critical workloads.
330 questions
{count} votes

Accepted answer
  1. Wilko van de Velde 2,146 Reputation points
    2023-01-06T06:57:08.187+00:00
    1 person found this answer helpful.
    0 comments No comments

0 additional answers

Sort by: Most helpful