Hi everyone,
I’m working with Business Events in Dynatrace and facing an issue I can’t solve. I have a string field named rs.body_result that contains a JSON_ARRAY of objects. Each object includes a broadcast_time key (numeric long). Example:
[
{"keyA": "valueA", "broadcast_time": 123456},
{"keyA": "valueA", "broadcast_time": 153824},
...
]
What I need:
- Get the maximum broadcast_time value,
- Per event.id,
- Without generating duplicated rows or breaking pipeline compatibility.
The only working solution so far is:
fetch bizevents
| parse rs.body_result, """JSON_ARRAY:parsed_json_elements"""
| expand parsed_json_elements
| fieldsFlatten parsed_json_elements
| fields event.id, time = parsed_json_elements[broadcast_time]
| summarize max(time) by: {event.id}
This works, but expand creates one row per element in the array, which duplicates events and cannot be used in pipelines, where expand is not allowed.
Is there any way to get the maximum broadcast_time per event.id without using expand?
Any ideas, workarounds or suggestions would be really appreciated.
I’ve attached a sample rs.body_result with dummy data.
Thanks in advance!
example.json (3.7 KB)