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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -666,21 +666,28 @@ drop timeseries root.ln.wf02.*;
### 3.4 Show Timeseries
* SHOW LATEST? TIMESERIES pathPattern? whereClause? limitClause?
#### 1. Grammar
There are four optional clauses added in SHOW TIMESERIES, return information of time series
Timeseries information includes: timeseries path, alias of measurement, database it belongs to, data type, encoding type, compression type, tags and attributes.
```sql
// ---- Show Timeseries
showTimeseries
: SHOW LATEST? TIMESERIES prefixPath? timeseriesWhereClause? timeConditionClause? orderByTimeseriesClause? rowPaginationClause?
;
// order by timeseries for SHOW TIMESERIES
orderByTimeseriesClause
: ORDER BY TIMESERIES (ASC | DESC)?
;
```
Examples:
The timeseries query results include: timeseries path, database, alias of measurement, data type, encoding, compression, tags and attributes, etc.
* SHOW TIMESERIES
> Note: Since V2.0.11, the query results can be sorted by timeseries name.
presents all timeseries information in JSON form
#### 2. Usage
* SHOW TIMESERIES <`PathPattern`>
* **`SHOW TIMESERIES`**: presents all timeseries information in the system
returns all timeseries information matching the given <`PathPattern`>. SQL statements are as follows:
* **`SHOW TIMESERIES <Path>`**: returns all timeseries information under the given path. The `Path` should be a timeseries path or a path pattern. For example, to view the timeseries under the `root` path and the `root.ln` path respectively, the SQL statements are as follows:
```sql
show timeseries root.**;
Expand DownExpand Up
@@ -716,17 +723,13 @@ Total line number = 4
It costs 0.004s
```
* SHOW TIMESERIES LIMIT INT OFFSET INT
returns all the timeseries information start from the offset and limit the number of series returned. For example,
* **`SHOW TIMESERIES LIMIT INT OFFSET INT`**: returns all the timeseries information start from the offset and limit the number of series returned. For example,
```sql
show timeseries root.ln.** limit 10 offset 10
```
* SHOW TIMESERIES WHERE TIMESERIES contains 'containStr'
The query result set is filtered by string fuzzy matching based on the names of the timeseries. For example:
* **`SHOW TIMESERIES WHERE TIMESERIES contains 'containStr'`**: The query result set is filtered by string fuzzy matching based on the names of the timeseries. For example:
```sql
show timeseries root.ln.** where timeseries contains 'wf01.wt'
Expand All
@@ -745,9 +748,7 @@ Total line number = 2
It costs 0.016s
```
* SHOW TIMESERIES WHERE DataType=type
The query result set is filtered by data type. For example:
* **`SHOW TIMESERIES WHERE DataType=type`**: The query result set is filtered by data type. For example:
```sql
show timeseries root.ln.** where dataType=FLOAT
Expand All
@@ -768,10 +769,7 @@ It costs 0.016s
```
* SHOW TIMESERIES WHERE TAGS(KEY) = VALUE
* SHOW TIMESERIES WHERE TAGS(KEY) CONTAINS VALUE
The query result set is filtered by tags. For example:
* **`SHOW TIMESERIES WHERE TAGS(KEY) = VALUE`** / **`SHOW TIMESERIES WHERE TAGS(KEY) CONTAINS VALUE`**: The query result set is filtered by tags. For example:
```sql
show timeseries root.ln.** where TAGS(unit)='c';
Expand DownExpand Up
@@ -800,11 +798,57 @@ It costs 0.004s
```
* SHOW LATEST TIMESERIES
* **`SHOW LATEST TIMESERIES`**: the returned timeseries are sorted in descending order of the last insertion timestamp. Note that when the queried path does not exist, the system will return 0 timeseries.
* **`SHOW INVALID TIMESERIES`**: Since V2.0.8, this SQL statement is supported to show the invalidated timeseries after a full path rename succeeds.
Note: The last column `NewPath` in the result shows the new timeseries corresponding to the invalidated one, which serves scenarios such as view construction and cluster migration (Load + rename).
* **`SHOW TIMESERIES ORDER BY TIMESERIES (ASC | DESC)`**: Since V2.0.11, the query results can be sorted by timeseries name.
```sql
-- Sort by timeseries name in descending order
show timeseries root.ln.** order by timeseries desc
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@@ -666,21 +666,28 @@ drop timeseries root.ln.wf02.*;
### 3.4 Show Timeseries
* SHOW LATEST? TIMESERIES pathPattern? whereClause? limitClause?
#### 1. Grammar
There are four optional clauses added in SHOW TIMESERIES, return information of time series
Timeseries information includes: timeseries path, alias of measurement, database it belongs to, data type, encoding type, compression type, tags and attributes.
```sql
// ---- Show Timeseries
showTimeseries
: SHOW LATEST? TIMESERIES prefixPath? timeseriesWhereClause? timeConditionClause? orderByTimeseriesClause? rowPaginationClause?
;
// order by timeseries for SHOW TIMESERIES
orderByTimeseriesClause
: ORDER BY TIMESERIES (ASC | DESC)?
;
```
Examples:
The timeseries query results include: timeseries path, database, alias of measurement, data type, encoding, compression, tags and attributes, etc.
* SHOW TIMESERIES
> Note: Since V2.0.11, the query results can be sorted by timeseries name.
presents all timeseries information in JSON form
#### 2. Usage
* SHOW TIMESERIES <`PathPattern`>
* **`SHOW TIMESERIES`**: presents all timeseries information in the system
returns all timeseries information matching the given <`PathPattern`>. SQL statements are as follows:
* **`SHOW TIMESERIES <Path>`**: returns all timeseries information under the given path. The `Path` should be a timeseries path or a path pattern. For example, to view the timeseries under the `root` path and the `root.ln` path respectively, the SQL statements are as follows:
```sql
show timeseries root.**;
Expand DownExpand Up
@@ -716,17 +723,13 @@ Total line number = 4
It costs 0.004s
```
* SHOW TIMESERIES LIMIT INT OFFSET INT
returns all the timeseries information start from the offset and limit the number of series returned. For example,
* **`SHOW TIMESERIES LIMIT INT OFFSET INT`**: returns all the timeseries information start from the offset and limit the number of series returned. For example,
```sql
show timeseries root.ln.** limit 10 offset 10
```
* SHOW TIMESERIES WHERE TIMESERIES contains 'containStr'
The query result set is filtered by string fuzzy matching based on the names of the timeseries. For example:
* **`SHOW TIMESERIES WHERE TIMESERIES contains 'containStr'`**: The query result set is filtered by string fuzzy matching based on the names of the timeseries. For example:
```sql
show timeseries root.ln.** where timeseries contains 'wf01.wt'
Expand All
@@ -745,9 +748,7 @@ Total line number = 2
It costs 0.016s
```
* SHOW TIMESERIES WHERE DataType=type
The query result set is filtered by data type. For example:
* **`SHOW TIMESERIES WHERE DataType=type`**: The query result set is filtered by data type. For example:
```sql
show timeseries root.ln.** where dataType=FLOAT
Expand All
@@ -768,10 +769,7 @@ It costs 0.016s
```
* SHOW TIMESERIES WHERE TAGS(KEY) = VALUE
* SHOW TIMESERIES WHERE TAGS(KEY) CONTAINS VALUE
The query result set is filtered by tags. For example:
* **`SHOW TIMESERIES WHERE TAGS(KEY) = VALUE`** / **`SHOW TIMESERIES WHERE TAGS(KEY) CONTAINS VALUE`**: The query result set is filtered by tags. For example:
```sql
show timeseries root.ln.** where TAGS(unit)='c';
Expand DownExpand Up
@@ -800,11 +798,57 @@ It costs 0.004s
```
* SHOW LATEST TIMESERIES
* **`SHOW LATEST TIMESERIES`**: the returned timeseries are sorted in descending order of the last insertion timestamp. Note that when the queried path does not exist, the system will return 0 timeseries.
* **`SHOW INVALID TIMESERIES`**: Since V2.0.8, this SQL statement is supported to show the invalidated timeseries after a full path rename succeeds.
Note: The last column `NewPath` in the result shows the new timeseries corresponding to the invalidated one, which serves scenarios such as view construction and cluster migration (Load + rename).
* **`SHOW TIMESERIES ORDER BY TIMESERIES (ASC | DESC)`**: Since V2.0.11, the query results can be sorted by timeseries name.
```sql
-- Sort by timeseries name in descending order
show timeseries root.ln.** order by timeseries desc
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.