Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X
Hi. Still learning ThingWorx so bear with me. I managed to log some live property data with a ValueStream using an Influx persistence provider. And showing it on a LED/Guage in a mashup. So far so good, cool stuff.
But what now, if I would like to apply some math to the property values to e.g. calculate output over the last 5 minutes. Can I write custom queries to InfluxDb, or must everything go through the ValueStream for mashups?
What's the recommended approach?
Hello,
Here's a month-old article, which suggests that you can't do native InfluxDB aggregations just yet. It also offers some workarounds, e.g. using InfluxDB's REST endpoints.
On a side note, one of the methods we used successfully in the past (before InfluxDB) is pre-aggregating data at the time of ingestion, i.e. store running totals / averages / etc. Depending on your use case it might have dramatic effect on performance at the expense of overall database size and additional code complexity.
Regards,
Constantine