I am sure they are trading reliability of third party dashboards for all the features and big fixes.
I don’t like to mention it, but it seems like each post I must mention once or some ideas that work on more updated versions come up.
The script way works in the console for the testing.
To make it work for my application though:
I need to
- make table on a perspective page
- bind the data:
data =[]
dataIN=system.dataset.toPyDataSet(system.db.runNamedQuery(namedQuery, parameters))
or since it is in a bindings
-
query binding to my named query filtered for machine and time range
-
then use the script transform
-
in the script transform I use
data =[]
dataIN=system.dataset.toPyDataSet(value)
- include the header filtering
- perform the reversed, sorted, zip which gets data into rows with columns sorted by the max
return pareto
Pareto in the script is a pydataset?
pareto variable became a pydataset because filteredheaders became a pydataset in the list comprehension getting the column names rom dataIn
a pydataset can be returned as the data for a table in perspective if I understand correctly
I plan to try this in the morning. I don’t think I can break it, but my brain is jello.
Tried for a long time to find a way that a wide table can be converted to tall table
functionally
for row in dataIn:
data = [row[colName] for colName in filteredHeaders]
#Sorting a zip sorts all lists by the first one.
pareto = [[x, y] for y, x in reversed(sorted(zip(data, filteredHeaders)))][:5]
print row['t_stamp'], pareto
dataIn is a pydataset because set it as one
filteredheaders is a pydataset because it is comprised of dataIn
data is a pydataset because it is comprised of filteredheaders
pareto is a pydataset
so I am not sure I understand
I have 5 pages of the manual open, but am not figuring it out.
I think a few examples are just shy of filling in the gaps for me.
I understand SQL much better, but this seems like something that can’t be done in SQL.
Or if it can be, it requires a query of the information schema to get the column names and manipulate them, which I am pretty sure I can’t do because of permissions.