The Timescale Toolkit team is proud to announce the 1.10.1 version of the TimescaleDB Toolkit extension! This version is now available on Timescale Cloud, as part of our HA docker image, as a DEB or RPM package, or as source code at our github repository.
New OHLC aggregate and accompanying accessors
The new OHLC aggregate takes in stock price data and computes the opening, high, low, and closing prices during that time to support the creation of candlestick charts. While these calculations were already possible using the first()
and last()
TimescaleDB hyperfunctions and the PostgreSQL max()
and min()
aggregates, the new toolkit_experimental.ohlc()
aggregate can also be used with a rollup()
hyperfunction. This means that users with financial data in Continuous Aggregates can get candlestick datasets aggregated at multiple levels from a single continuous aggregate. Additionally, we provide {open,high,low,close}_at()
hyperfunctions that return the timestamp associated with a corresponding price.
New monthly normalization
The new month_normalize() function normalizes a provided metric based on the supplied reference date and a fixed length month value. This function comes very handy when you want to have more meaningful month to month sales comparison, for example.
Stabilized LTTB
Thanks to valuable feedback from our users, we have stabilized the highly desirable lttb downsampling function. Users no longer need to qualify the function with toolkit_experimental. If you have been using this function in the previous versions of Toolkit, be sure to remove the toolkit_experimental qualification.
Stabilized accessors for aggregates
We’ve made the accessor functions for aggregates even easier to use by stabilizing the arrow operators (“->”) for them. As an example, the average accessor can be used through the “->” operator with stats_agg as demonstrated in the following example:
select location,
stats_agg(temperature) -> average() AS avg_temperature
from conditions
group by location
All the accessor functions for statistical aggregates, percentile approximation, counter and gauge aggregation, and approximate count distincts (using hyperloglog++) can be used in this pattern.
Other changes
1.10.1 also includes numerous fixes and quality of life adjustments for toolkit functionality. The most noteworthy among these are fixing off by one error in state_agg interpolate, and stabilization of timevector.
Conclusion
We encourage everyone to try out this new version of the toolkit and let us know what you think! We’d love to hear from you any improvements or adjustments you’d like to make to the experimental functions, or even if you like them the way they are and would like to see them moving out of our experimental schema. You can leave us a response here to this post, send us a note in our slack channel, or add an issue to the toolkit repository. Thank you!