Hello all, I am working in ignition 8.1 with the vision module.
I have a dataset that consists of the last 24 hours worth of data for a single temp tag. So the current dataset is two columns: a time column and the column for all the values.
I want to break up or create a new dataset from that current dataset that will have each hour of the 24 hours in column form so I can them bind that dataset to a box and whisker plot to show each hour on operation throughout the day.
This is the current dataset that I have:
Sure. Write jython to process the data. As noted in the documentation, if you get something working with the view() function but need to deploy without it, its debugger can be turned on to show you the jython it used for your case. You could then re-deploy that in a script module and call from a property change event.
When grouping, in the SELECT expressions, all of the columns are delivered as python lists. When you use a bare column name, my parser will stick a [0] onto the select expression for you, but once you wrap in some other function, you will have to handle it yourself (if the function doesn't take lists).
So, you should use:
SELECT system.date.getHour24(t_stamp[0]) As hour24, system.aggregate.count(high_cap)
GROUP BY system.date.getHour24(t_stamp)