Forum Discussion
Easiest ways to get from Dynatrace Timeseries with REST API in json format file to Power BI graphing
Hello to all in the Power BI Community:
I’ve come across a need to export metrics data from the Casandra database.
I have been working with the REST API for purposes of extraction. It returns the data
In a JSON format.
Ultimately this data is going to end up in a POWER BI data set that is part of a long term report/Operational dashboard.
However When I attempt to import the data into power BI, I end up with a table that has only header information. I will attach sample JSON file data and and image of power BI.
I don't want to re-invent the wheel if there is already an easier way to import this into Power BI or reformat the JSON file so that Power BI can read it more readily.
Does anyone know of a means? If I need to manipulate the file format I'm most comfortable with python, and pwoershell after that.
Please suggest any means you think would assist.
Kindest regards,
Here is the sample Json code/format and an image when imported into Power BI . Im not seeing the actual
data sets contained in example these sets of brackets
{
"timeseriesId": "com.dynatrace.builtin:host.nic.bytesreceived",
"displayName": "Network interface bytes received on host",
"dimensions": [
"HOST",
"NETWORK_INTERFACE"
],
"unit": "BytePerSecond (B/s)",
"detailedSource": "Infrastructure",
"types": [],
"dataResult": {
"dataPoints": {
"HOST-ABCD1234, NETWORK_INTERFACE-ABCD1234": [
[
1566323040000,
263687.34375
],
[
1566323100000,
166058.40625
],
[
1566323160000,
172781.6875
],
[
1566323220000,
253953.96875
],
[
1566323280000,
527919
],
[
1566323340000,
688350.1875
],
[
1566323400000,
904895.5
],
[
1566323460000,
267182.9375
],
[
1566323520000,
188694.296875
],
[
1566323580000,
324438.40625
]
]
},
"unit": "BytePerSecond (B/s)",
"resolutionInMillisUTC": 60000,
"aggregationType": "MIN",
"entities": {
"HOST-ABCD1234": "SERVER.com",
"NETWORK_INTERFACE-ABCD1234": "Adapter"
},
"timeseriesId": "com.dynatrace.builtin:host.nic.bytesreceived"
},
"aggregationTypes": [
"AVG",
"SUM",
"MIN",
"MAX"
],
"filter": "BUILTIN"
}
1 Reply
- v-juanli-msft
Community Support
Hi runatyr
According to the guide document, I can get data from json format with Power BI.
But since your code is of format
"HOST-ABCD1234, NETWORK_INTERFACE-ABCD1234": [
[
1566323040000,
263687.34375
]not
HOST-ABCD1234:****,
NETWORK_INTERFACE-ABCD1234: ****
Finally, i get all number values in one column.
A workaround is :
1. add an index from 1, then add a custom column
Custom=Number.Mod([Index],2)
2. select "custom" column, pivot column
3.
fill down for column "1",
fill up for column "2",
then remove the "index" column,
then remove duplicates rows
Finally, change the column name to expected ones.
Best Regards
MaggieCommunity Support Team _ Maggie Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.