Interpolation Query
During the query, the data can be interpolated. Even if there is no data writing, the data can be queried according to a certain interpolation algorithm. Currently, Linear, Previous and Fixed interpolation algorithms are supported.
Linear:
Previous:
Fixed:
When querying, it is necessary to set the maximum write interval, such as 15min, that is, the maximum write interval of a time series data. TSDB considers that there must be a value in this interval. The system will attempt to find points from (start - maxWriteInterval) to start and end to (end + maxWriteInterval).
If there is no point from (start - maxWriteInterval) to start, the missing point before the first point between start and end will be interpolated by the value of the first point;
If there is no point from end to (end + maxWriteInterval), the missing point after the last point between start and end will be interpolated by the value of the last point.
Take Previous interpolation as an example. As shown in the following figure, solid points are actually transmitted and hollow points are complemented by the system.