Time Series Data Treatments
Data normalization is a preprocessing step that removes duplicate, overlapping, missing, or out-of-order entries. This process creates a consistent time series.
The normalization process aggregates and disaggregates incoming time series data to produce a uniform time series. For each field in time series data, you must specify a treatment for the aggregation.
The following list displays the options available for time series data treatments:
- PREVIOUS: See AggOp#PREVIOUS
- EARLIEST: See AggOp#EARLIEST
- LATEST: See AggOp#LATEST
- AND: See AggOp#AND
- OR: See AggOp#OR
- COUNT: See AggOp#COUNT
- ROLLINGCOUNT: See AggOp#ROLLINGCOUNT
- INTEGRAL: See AggOp#INTEGRAL
- SUM: See AggOp#SUM
- PROD: See AggOp#PROD
- RATE: See AggOp#RATE
- AVG: See AggOp#AVG
- MIN: See AggOp#MIN
- MAX: See AggOp#MAX
- STDDEV: See AggOp#STDDEV
- VARIANCE: See AggOp#VARIANCE
- PERCENTILE: See AggOp#PERCENTILE
- MEDIAN: See AggOp#MEDIAN
- ALL: See AggOp#ALL
Use the @ts notation to specify a treatment when declaring a field.
The following example defines a time series Type that uses the avg data treatment for the temperature field:
Type
entity type CityMeasurementDataPoint mixes TimedDataPoint<CityMeasurementHeader> schema name "CITYMEASUREMENTDATAPOINT" {
// The measured temperature in degrees Celsius
@ts(treatment='avg')
temperature: double
}See AggOp Type (aggregation operation Type) for more detailed information on each treatment.