Community Tip - When posting, your subject should be specific and summarize your question. Here are some additional tips on asking a great question. X
Hi,
I have just started exploring the ThingWorx and tried to fetch the historical data (time series) using get QueryPropertyHistory service. We can fetch using filters like date, record count, sorted etc.
I want to write a custom service that does aggregation operations on this data and persist this aggregated data in some form.
What are the supported ways for handling such huge data, transform it and persist?
Thank you
Solved! Go to Solution.
Hi,
There is Aggregate function at the level of infotable. Please see this article: https://www.ptc.com/en/support/article/CS245756
So, actually you need to get the data into an infotable and then use aggregate function.
Hope it helps,
Raluca Edu
Hi,
Don't know how huge is the data, but you can use DataTables to keep data.
Also, if you are using time series data, an idea would be to keep/log the properties values in InfluxDB (only starting Thingworx. 8.4.x).
Hope it helps,
Raluca Edu
Thank you for the reply @raluca_edu
I understand that the data tables are used to store the static data that is not tied to a single Thing. My confusion is the next part. Assuming I have the data table ready with the data, I want to do aggregate operations like sum, count, average etc on particular column.
Are there any OOTB solutions/functions/services for such use cases?
It would help if such is supported - either as a local/ remote(e.g. using java sdk) service, where manual/programmatic iteration of data is not needed.
Hi,
There is Aggregate function at the level of infotable. Please see this article: https://www.ptc.com/en/support/article/CS245756
So, actually you need to get the data into an infotable and then use aggregate function.
Hope it helps,
Raluca Edu
@raluca_edu Thanks a lot! This seems very much simpler solution.
I was also exploring Property Transforms under ThingWorx Analytics. It seems we can achieve the aggregation operations (except Sum) using StatisticalCalculation Microserver as well.
I will try out both and choose the one which suits the best.