You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/UserGuide/Master/Tree/Reference/Operator-and-Expression.md
-25Lines changed: 0 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -252,31 +252,6 @@ For details and examples, see the document [Sample Functions](../Reference/Funct
252
252
253
253
For details and examples, see the document [Time-Series](../Reference/Function-and-Expression.md#time-series-processing).
254
254
255
-
## DATA QUALITY FUNCTION LIBRARY
256
-
257
-
### About
258
-
259
-
For applications based on time series data, data quality is vital. **UDF Library** is IoTDB User Defined Functions (UDF) about data quality, including data profiling, data quality evalution and data repairing. It effectively meets the demand for data quality in the industrial field.
260
-
261
-
### Quick Start
262
-
263
-
The functions in this function library are not built-in functions, and must be loaded into the system before use.
264
-
265
-
1.[Download](https://archive.apache.org/dist/iotdb/1.0.1/apache-iotdb-1.0.1-library-udf-bin.zip) the JAR with all dependencies and the script of registering UDF.
266
-
2. Copy the JAR package to `ext\udf` under the directory of IoTDB system (Please put JAR to this directory of all DataNodes if you use Cluster).
267
-
3. Run `sbin\start-confignode.bat` and then `sbin\start-datanode.bat` (for Windows) or `sbin\start-confignode.sh` and `sbin\start-datanode.sh` (for Linux or MacOS) to start IoTDB server.
268
-
4. Copy the script to the directory of IoTDB system (under the root directory, at the same level as `sbin`), modify the parameters in the script if needed and run it to register UDF.
269
-
270
-
### Implemented Functions
271
-
272
-
1. Data Quality related functions, such as `Completeness`. For details and examples, see the document [Data-Quality](../Reference/UDF-Libraries.md#data-quality).
273
-
2. Data Profiling related functions, such as `ACF`. For details and examples, see the document [Data-Profiling](../Reference/UDF-Libraries.md#data-profiling).
274
-
3. Anomaly Detection related functions, such as `IQR`. For details and examples, see the document [Anomaly-Detection](../Reference/UDF-Libraries.md#anomaly-detection).
275
-
4. Frequency Domain Analysis related functions, such as `Conv`. For details and examples, see the document [Frequency-Domain](../Reference/UDF-Libraries.md#frequency-domain-analysis).
276
-
5. Data Matching related functions, such as `DTW`. For details and examples, see the document [Data-Matching](../Reference/UDF-Libraries.md#data-matching).
277
-
6. Data Repairing related functions, such as `TimestampRepair`. For details and examples, see the document [Data-Repairing](../Reference/UDF-Libraries.md#timestamprepair).
278
-
7. Series Discovery related functions, such as `ConsecutiveSequences`. For details and examples, see the document [Series-Discovery](../Reference/UDF-Libraries.md).
279
-
8. Machine Learning related functions, such as `AR`. For details and examples, see the document [Machine-Learning](../Reference/UDF-Libraries.md#machine-learning).
Copy file name to clipboardExpand all lines: src/UserGuide/Master/Tree/Reference/Syntax-Rule.md
+1-14Lines changed: 1 addition & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@
19
19
20
20
-->
21
21
22
-
# Syntax Rule
22
+
# Identifiers
23
23
24
24
## Literal Values
25
25
@@ -278,16 +278,3 @@ Examples of case in which quoted identifier is used :
278
278
279
279
- Nodes except database in the path are allowed to contain the "*" symbol, when using this symbol it is required to enclose the node in backquotes, e.g., root.db.`*`, but this usage is only recommended when the path cannot avoid containing the "*" symbol.
280
280
281
-
## KeyWords Words
282
-
283
-
Keywords are words that have significance in SQL. Keywords can be used as an identifier. Certain keywords, such asTIME/TIMESTAMPand ROOT, are reserved and cannot use as identifiers.
284
-
285
-
[Keywords](../Reference/Keywords.md) shows the keywords in IoTDB.
286
-
287
-
## Detailed Definitions of Lexical and Grammar
288
-
289
-
Please read the lexical and grammar description files in our code repository:
Copy file name to clipboardExpand all lines: src/UserGuide/Master/Tree/User-Manual/Database-Programming.md
+26-27Lines changed: 26 additions & 27 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,17 +19,16 @@
19
19
20
20
-->
21
21
22
-
# Database Programming
22
+
# CONTINUOUS QUERY(CQ)
23
23
24
-
## CONTINUOUS QUERY (CQ)
25
24
26
-
###Introduction
25
+
## Introduction
27
26
28
27
Continuous queries(CQ) are queries that run automatically and periodically on realtime data and store query results in other specified time series.
29
28
30
29
Users can implement sliding window streaming computing through continuous query, such as calculating the hourly average temperature of a sequence and writing it into a new sequence. Users can customize the `RESAMPLE` clause to create different sliding windows, which can achieve a certain degree of tolerance for out-of-order data.
31
30
32
-
###Syntax
31
+
## Syntax
33
32
34
33
```sql
35
34
CREATE (CONTINUOUS QUERY | CQ) <cq_id>
@@ -58,7 +57,7 @@ END
58
57
> 2. GROUP BY TIME CLAUSE is different, it doesn't contain its original first display window parameter which is [start_time, end_time). It's still because IoTDB will automatically generate a time range for the query each time it's executed.
59
58
> 3. If there is no group by time clause in query, EVERY clause is required, otherwise IoTDB will throw an error.
60
59
61
-
####Descriptions of parameters in CQ syntax
60
+
### Descriptions of parameters in CQ syntax
62
61
63
62
-`<cq_id>` specifies the globally unique id of CQ.
64
63
-`<every_interval>` specifies the query execution time interval. We currently support the units of ns, us, ms, s, m, h, d, w, and its value should not be lower than the minimum threshold configured by the user, which is `continuous_query_min_every_interval`. It's an optional parameter, default value is set to `group_by_interval` in group by clause.
@@ -80,19 +79,19 @@ END
80
79
> - If `<start_time_offset>` is less than `<every_interval>`, there may be uncovered data between each query window.
81
80
> -`start_time_offset` should be larger than `end_time_offset`, otherwise the system will throw an error.
-`DISCARD` means that we just discard the current cq execution task and wait for the next execution time and do the next time interval cq task. If using `DISCARD` policy, some time intervals won't be executed when the execution time of one cq task is longer than the `<every_interval>`. However, once a cq task is executed, it will use the latest time interval, so it can catch up at the sacrifice of some time intervals being discarded.
103
102
104
103
105
-
###Examples of CQ
104
+
## Examples of CQ
106
105
107
106
The examples below use the following sample data. It's a real time data stream and we can assume that the data arrives on time.
108
107
@@ -122,7 +121,7 @@ The examples below use the following sample data. It's a real time data stream a
Use an `EVERY` interval in the `RESAMPLE` clause to specify the CQ’s execution interval, if not specific, default value is equal to `group_by_interval`.
128
127
@@ -180,7 +179,7 @@ At **2021-05-11T22:19:00.000+08:00**, `cq1` executes a query within the time ran
Use `start_time_offset` in the `RANGE` clause to specify the start time of the CQ’s time range, if not specific, default value is equal to `EVERY` interval.
186
185
@@ -255,7 +254,7 @@ At **2021-05-11T22:19:00.000+08:00**, `cq2` executes a query within the time ran
####Configuring execution intervals and CQ time ranges
257
+
### Configuring execution intervals and CQ time ranges
259
258
260
259
Use an `EVERY` interval and `RANGE` interval in the `RESAMPLE` clause to specify the CQ’s execution interval and the length of the CQ’s time range. And use `fill()` to change the value reported for time intervals with no data.
261
260
@@ -320,7 +319,7 @@ Notice that `cq3` will calculate the results for some time interval many times,
Use an `EVERY` interval and `RANGE` interval in the RESAMPLE clause to specify the CQ’s execution interval and the length of the CQ’s time range. And use `fill()` to change the value reported for time intervals with no data.
326
325
@@ -379,7 +378,7 @@ Notice that `cq4` will calculate the results for all time intervals only once af
@@ -520,36 +519,36 @@ DROP (CONTINUOUS QUERY | CQ) <cq_id>
520
519
521
520
DROP CQ returns an empty result.
522
521
523
-
#####Examples
522
+
#### Examples
524
523
525
524
Drop the CQ named `s1_count_cq`:
526
525
527
526
```sql
528
527
DROP CONTINUOUS QUERY s1_count_cq;
529
528
```
530
529
531
-
####Altering continuous queries
530
+
### Altering continuous queries
532
531
533
532
CQs can't be altered once they're created. To change a CQ, you must `DROP` and re`CREATE` it with the updated settings.
534
533
535
534
536
-
###CQ Use Cases
535
+
## CQ Use Cases
537
536
538
-
####Downsampling and Data Retention
537
+
### Downsampling and Data Retention
539
538
540
539
Use CQs with `TTL` set on database in IoTDB to mitigate storage concerns. Combine CQs and `TTL` to automatically downsample high precision data to a lower precision and remove the dispensable, high precision data from the database.
541
540
542
-
####Recalculating expensive queries
541
+
### Recalculating expensive queries
543
542
544
543
Shorten query runtimes by pre-calculating expensive queries with CQs. Use a CQ to automatically downsample commonly-queried, high precision data to a lower precision. Queries on lower precision data require fewer resources and return faster.
545
544
546
545
> Pre-calculate queries for your preferred graphing tool to accelerate the population of graphs and dashboards.
547
546
548
-
####Substituting for sub-query
547
+
### Substituting for sub-query
549
548
550
549
IoTDB does not support sub queries. We can get the same functionality by creating a CQ as a sub query and store its result into other time series and then querying from those time series again will be like doing nested sub query.
551
550
552
-
#####Example
551
+
#### Example
553
552
554
553
IoTDB does not accept the following query with a nested sub query. The query calculates the average number of non-null values of `s1` at 30 minute intervals:
555
554
@@ -584,7 +583,7 @@ SELECT avg(count_s1) from root.sg_count.d;
584
583
```
585
584
586
585
587
-
###System Parameter Configuration
586
+
## System Parameter Configuration
588
587
589
588
| Name | Description | Data Type | Default Value |
Copy file name to clipboardExpand all lines: src/UserGuide/latest/Reference/Operator-and-Expression.md
-25Lines changed: 0 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -252,31 +252,6 @@ For details and examples, see the document [Sample Functions](../Reference/Funct
252
252
253
253
For details and examples, see the document [Time-Series](../Reference/Function-and-Expression.md#time-series-processing).
254
254
255
-
## DATA QUALITY FUNCTION LIBRARY
256
-
257
-
### About
258
-
259
-
For applications based on time series data, data quality is vital. **UDF Library** is IoTDB User Defined Functions (UDF) about data quality, including data profiling, data quality evalution and data repairing. It effectively meets the demand for data quality in the industrial field.
260
-
261
-
### Quick Start
262
-
263
-
The functions in this function library are not built-in functions, and must be loaded into the system before use.
264
-
265
-
1.[Download](https://archive.apache.org/dist/iotdb/1.0.1/apache-iotdb-1.0.1-library-udf-bin.zip) the JAR with all dependencies and the script of registering UDF.
266
-
2. Copy the JAR package to `ext\udf` under the directory of IoTDB system (Please put JAR to this directory of all DataNodes if you use Cluster).
267
-
3. Run `sbin\start-confignode.bat` and then `sbin\start-datanode.bat` (for Windows) or `sbin\start-confignode.sh` and `sbin\start-datanode.sh` (for Linux or MacOS) to start IoTDB server.
268
-
4. Copy the script to the directory of IoTDB system (under the root directory, at the same level as `sbin`), modify the parameters in the script if needed and run it to register UDF.
269
-
270
-
### Implemented Functions
271
-
272
-
1. Data Quality related functions, such as `Completeness`. For details and examples, see the document [Data-Quality](../Reference/UDF-Libraries.md#data-quality).
273
-
2. Data Profiling related functions, such as `ACF`. For details and examples, see the document [Data-Profiling](../Reference/UDF-Libraries.md#data-profiling).
274
-
3. Anomaly Detection related functions, such as `IQR`. For details and examples, see the document [Anomaly-Detection](../Reference/UDF-Libraries.md#anomaly-detection).
275
-
4. Frequency Domain Analysis related functions, such as `Conv`. For details and examples, see the document [Frequency-Domain](../Reference/UDF-Libraries.md#frequency-domain-analysis).
276
-
5. Data Matching related functions, such as `DTW`. For details and examples, see the document [Data-Matching](../Reference/UDF-Libraries.md#data-matching).
277
-
6. Data Repairing related functions, such as `TimestampRepair`. For details and examples, see the document [Data-Repairing](../Reference/UDF-Libraries.md#timestamprepair).
278
-
7. Series Discovery related functions, such as `ConsecutiveSequences`. For details and examples, see the document [Series-Discovery](../Reference/UDF-Libraries.md).
279
-
8. Machine Learning related functions, such as `AR`. For details and examples, see the document [Machine-Learning](../Reference/UDF-Libraries.md#machine-learning).
Copy file name to clipboardExpand all lines: src/UserGuide/latest/Reference/Syntax-Rule.md
+1-15Lines changed: 1 addition & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -19,7 +19,7 @@
19
19
20
20
-->
21
21
22
-
# Syntax Rule
22
+
# Identifiers
23
23
24
24
## Literal Values
25
25
@@ -277,17 +277,3 @@ Examples of case in which quoted identifier is used :
277
277
- The key/value of an attribute can be String Literal and identifier, more details can be found at **key-value pair** part.
278
278
279
279
- Nodes except database in the path are allowed to contain the "*" symbol, when using this symbol it is required to enclose the node in backquotes, e.g., root.db.`*`, but this usage is only recommended when the path cannot avoid containing the "*" symbol.
280
-
281
-
## KeyWords Words
282
-
283
-
Keywords are words that have significance in SQL. Keywords can be used as an identifier. Certain keywords, such asTIME/TIMESTAMPand ROOT, are reserved and cannot use as identifiers.
284
-
285
-
[Keywords](../Reference/Keywords.md) shows the keywords in IoTDB.
286
-
287
-
## Detailed Definitions of Lexical and Grammar
288
-
289
-
Please read the lexical and grammar description files in our code repository:
0 commit comments