-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tracking: time-series related functions #19343
Comments
These features are completed
|
The left part is
Related: Some old discussions about gap-filling #15830 |
I'm glad this is getting some attention. I can share some of the things I'm trying to do that might help with direction. I'm working with a lot of IoT data that needs to be downsampled to specific intervals with aggregation functions, gap-filled only up to a maximum duration, then filled with nulls or other values to indicate the sensor is offline. Sampled timestamps should always be continuous so sensors can be compared, correlated, pulled into ML sequences, etc. Interpolation functions can vary—LOCF and linear are common but don’t cover all IoT sensor types. Note that Also see: https://www.timescale.com/blog/sql-functions-for-time-series-analysis/
I have not tested the performance with this but would assume it would not be the best. This is just an example i swop out parts in code for different aggregation function and interpolations. But cant get it to fill gaps if there is no next value for realtime data up till now(). Hope it helps and let me know if you need me to test out some things. |
Downsampling (with gap-filling)
https://questdb.io/docs/reference/sql/sample-by/#fill-options
https://docs.timescale.com/api/latest/hyperfunctions/downsampling/
https://www.timescale.com/blog/how-to-proactively-manage-long-term-data-storage-with-downsampling/
https://docs.timescale.com/api/latest/hyperfunctions/gapfilling/time_bucket_gapfill/
Users would love to have this in materialized views.
timescale/timescaledb#1324
three common filling strategies:
locf
to carry the last value forwardinterpolate
to linearly interpolate the valueAgg Helper Functions
Candlestick: https://docs.timescale.com/api/latest/hyperfunctions/financial-analysis/candlestick_agg/#candlestick
Rollup. This function must work with an aggregation function.
Mathematics and Statistics
moving average, weighted average, weighted moving average and more generally as covered by InFluxDB’s “technical analysis” functions: https://docs.influxdata.com/enterprise_influxdb/v1/query_language/functions/#technical-analysis
one-variable statistical aggregation. The following ones are used often in risk calculation, e.g. tail risk and VAR risk that need to be monitored in real-time. https://docs.timescale.com/api/latest/hyperfunctions/statistical-and-regression-analysis/stats_agg-one-variable/
two-variable statistical aggregations. https://docs.timescale.com/api/latest/hyperfunctions/statistical-and-regression-analysis/stats_agg-two-variables/. Similar use cases as above. Just highlight a few common ones:
The text was updated successfully, but these errors were encountered: