Interpolators handle filling missing values when performing operations on time series such as filling in a value when grouping multiple series or substituting a value for an empty downsampling bucket.
While OpenTSDB 1.x and 2.x offered linear interpolation, 3.0 offers more options for greater control over results.
Whenever an interpolator config is required, the following fields can be supplied:
Name | Data Type | Required | Description | Default | Example |
---|---|---|---|---|---|
type | String | Optional | The type of interpolator to use. If null or empty, the default interpolator is used meaning it will only use the fillPolicy and realFillPolicy fields. Others may be available, see below. |
null | LERP |
dataType | String | Required | The data type this interpolator is to act on. There can be interpolators for numeric data and summary data with different configs for each. | null | Numeric |
fillPolicy | String | Required | The ID of a fill policy when interpolation cannot occur (e.g. there aren't enough values to interpolate or the interpolator doesn't actually interpolate). See below for details. | null | ZERO |
realFillPolicy | String | Required | An optional policy to use when real data is available and we would prefer to fill with that instead of synthetic data. | null | NONE |
value | Number | Optional | A value to substitute when the SCALAR FillPolicy is selected. |
null | 42 |
As seen above, there are a number of configurations available when interpolating data. The order of these settings is:
Possible values include:
FillPolicy
.Possible values include:
NaN
values (floating point).0
.value
field.Example:
"interpolatorConfigs": [{
"dataType": "numeric",
"fillPolicy": "NAN",
"realFillPolicy": "NONE"
}]
Linear interpolation. For now, see the old 2x docs till we port them over here.