Export multiple histories with roll up
-
Hello Everyone,
I see through the "Data Points Detail" view there is the option to roll up the data in to 1 minute intervals which I can then export to a CSV. Is there any way to do this with multiple points so I don't have to do this one by one and then copy all of the data in to one file?
Using the watch lists allows me to get multiple points in to 1 CSV but it lacks the roll up option.
Is there something that I am missing or is there an easier way to accomplish what I need?
Any help would be appreciated as always. Thanks!
-
Hi Ed,
Have you checked out the Excel Reports module? It's got what you're looking for!
You'll still have to do a little bit of work for each point setting up the template. Specifically, you'll want to use Excel to create a named range column for every point you want this rollup performed on in an empty workbook, then you'll have to add those points and associate them with their named range after uploading the template you create. But, after that, you'll have the report whenever you need it. The free version of the module supports a single report template.
-
Thank you for this information Philip.
Is this the only way to accomplish this? Often I am asked to grab data on point x, y, z but it generally isn't the same points since the information is generally used in troubleshooting. This seems like it would be great if I was pulling information from the same points a lot but sadly that is not the case for me and this process seems like it would be very cumbersome to do in the ad hoc fashion that is generally required.
-
Assuredly not! There are other options!
You can get this information all through API calls and do it programatically. If you enable swagger (env.properties --> swagger.enabled=true, restart mango to enable, navigate to [yourIp]:port/swagger), you can check out the options for the pointValues endpoint, specifically /rest/v1/pointValues/{xid} .
You could have a script that takes a list of XIDs (or if you wish to do the lookup from the JSON, anything), queries that endpoint, parses the values and saves it to a file or wherever else.
In case it is helpful, Woody posted a basic python script that authenticates and hits an API endpoint in this thread: http://infiniteautomation.com/forum/topic/2191/swagger-404-errors-on-rest-v1-realtime-by-xid/10
Python also has "import json" so you can iterableResponse = json.load(StringIO(response.text)) and then output the data as required.
-
Thanks again Philip.
I'll need to do a lot of reading before I feel confident with scripting and calling the API.
I thought that the Excel report was a lot more work then it really was. I just created a template with a ton of extra columns and I can change the points accordingly every time. I originally thought I would need to create a new template every time I needed new points but that is clearly not the case in my situation.
Thank you!