SQL Data to Properties for Time Series chart or plotting directly from a SQL query
Hi,
I have a database table were I keep the values of several parameters from aa machine on the shopfloor: temperature, current, quench flow, cycle time, etc. and a timestamp. Something like this:
| id | timestamp | temperature | current | quenchflow | cycletime |
|---|---|---|---|---|---|
| 1 | value | value | value | value | value |
| 2 | value | value | value | value | value |
I have a simple SQL query service that return the data in an Infotable with a simple SELECT statement. And, if I send this result directly to a Time Series chart (I use the timestamp column for the X axis) I can plot the data for all the variables in the same graph.
This is OK as test, but I´m wondering if I there is an option to provide a way to select just one of the columns from the SQL query, perhaps in a list and then use this to feed the Time Series chart and show only the data for that field.
I can iterate the Infotable, assign the values to the properties of a ThingHelper, mark this properties as logged to a Value Stream and after that I can use a QueryPropertyHistory service to get the data and plot to the TimeSeries chart. But I don't like this approach because it creates a copy of the data in Thingworx.
Anyone has ever tried this? O if you can give me some directions or examples I would really appreciate it.
Thans

