Update 14-stream.md

This commit is contained in:
Haojun Liao 2023-04-26 16:33:23 +08:00 committed by GitHub
parent cf57a3f3f6
commit a98cf1277f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 32 additions and 2 deletions

View File

@ -15,6 +15,9 @@ CREATE STREAM [IF NOT EXISTS] stream_name [stream_options] INTO stb_name SUBTABL
stream_options: { stream_options: {
TRIGGER [AT_ONCE | WINDOW_CLOSE | MAX_DELAY time] TRIGGER [AT_ONCE | WINDOW_CLOSE | MAX_DELAY time]
WATERMARK time WATERMARK time
IGNORE EXPIRED [0|1]
DELETE_MARK time
FILL_HISTORY [0|1]
} }
``` ```
@ -141,3 +144,30 @@ The data in expired windows is tagged as expired. TDengine stream processing pro
2. Recalculate the data. In this method, all data in the window is reobtained from the database and recalculated. The latest results are then returned. 2. Recalculate the data. In this method, all data in the window is reobtained from the database and recalculated. The latest results are then returned.
In both of these methods, configuring the watermark is essential for obtaining accurate results (if expired data is dropped) and avoiding repeated triggers that affect system performance (if expired data is recalculated). In both of these methods, configuring the watermark is essential for obtaining accurate results (if expired data is dropped) and avoiding repeated triggers that affect system performance (if expired data is recalculated).
## Supported functions
All scalar functions are available in stream processing.
All System Information Functions are <b>not</b> available for stream processing.
All aggregate and selection functions are available in stream processing, except following functions
- [leastsquares](../function/#leastsquares)
- [percentile](../function/#percentile)
- [top](../function/#leastsquares)
- [bottom](../function/#top)
- [elapsed](../function/#leastsquares)
- [interp](../function/#elapsed)
- [derivative](../function/#derivative)
- [irate](../function/#irate)
- [twa](../function/#twa)
- [histogram](../function/#histogram)
- [diff](../function/#diff)
- [statecount](../function/#statecount)
- [stateduration](../function/#stateduration)
- [csum](../function/#csum)
- [mavg](../function/#mavg)
- [sample](../function/#sample)
- [tail](../function/#tail)
- [unique](../function/#unique)
- [mode](../function/#mode)