Using the categories of different records in json format from a REST API as an attribute after using infinity datasource #765
Closed
bnnlukasEviden
started this conversation in
General
Replies: 1 comment 1 reply
-
you may need parse-json
| project kv()
| mv-expand "item"="value"
| project "category"="key", "id"="item.id", "name"="item.name", "create_date"=unixtime_milliseconds_todatetime("item.create_date"), "org_handle"="item.org_handle" |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
i have already addressed this topic in the Grafana forum, but was referred here.
i have a Rest API i am getting the data from in a JSON-format via the Infinity Plugin. The format of the input looks like this:
My goal is to get all the three records as rows in a table to do further transformations. The problem is that i want the top categories (“TBD”, “Denial of Service”) to be added as a feature to the records. So for the first record it should become:
And the same for the other two records, so the resulting table looks like this:
How can i do this? Maybe with an UQL statement? I am using the Grafana Version 10.3.1.
Thanks a lot in advance
Beta Was this translation helpful? Give feedback.
All reactions