docs:cdiwadkar16-patch-1 - example for INTERP
Added an example for INTERP functions using the smart meters demo
This commit is contained in:
parent
b51c15b73f
commit
98b6d607d8
|
@ -880,6 +880,15 @@ INTERP(expr)
|
|||
- Pseudocolumn `_irowts` can be used along with `INTERP` to return the timestamps associated with interpolation points(support after version 3.0.1.4).
|
||||
- Pseudocolumn `_isfilled` can be used along with `INTERP` to indicate whether the results are original records or data points generated by interpolation algorithm(support after version 3.0.2.3).
|
||||
|
||||
**Example**
|
||||
|
||||
- We use the smart meters example used in this documentation to illustrate how to use the INTERP function.
|
||||
- We want to downsample every 1 hour and use a linear fill for missing values. Note the order in which the "partition by" clause and the "range", "every" and "fill" parameters are used.
|
||||
|
||||
```sql
|
||||
SELECT _irowts,INTERP(current) FROM test.meters PARTITION BY TBNAME RANGE('2017-07-22 00:00:00','2017-07-24 12:25:00') EVERY(1h) FILL(LINEAR)
|
||||
```
|
||||
|
||||
### LAST
|
||||
|
||||
```sql
|
||||
|
|
Loading…
Reference in New Issue