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/Basic-Concept/Operate-Metadata_timecho.md
+45-5Lines changed: 45 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -421,7 +421,32 @@ You can set different datatype, encoding, and compression for the timeseries in
421
421
422
422
It is also supported to set an alias, tag, and attribute for aligned timeseries.
423
423
424
-
### 2.3 Delete Timeseries
424
+
### 2.3 Modifying Timeseries Name
425
+
426
+
Since version V2.0.8, it has been supported to modify the full path name of a timeseries through SQL statements. After a successful modification, the original name becomes invalid but is still retained in the metadata storage.
427
+
428
+
Syntax definition:
429
+
430
+
```sql
431
+
-- Supports modifying the full path of a certain sequence to another full path
432
+
ALTER TIMESERIES <oldPath> RENAME TO <newPath>
433
+
```
434
+
435
+
Usage instructions:
436
+
437
+
- This statement takes effect immediately upon successful execution, and the tags/attributes/alias of the original sequence will be migrated to the new sequence.
438
+
- The invalidated sequence (original sequence) no longer supports write, query, delete, or other operations. The name of the invalidated sequence will be retained by the system, and creating a new sequence with the same name is not allowed. This ensures the uniqueness and traceability of the original sequence name: it supports viewing the original sequence through the `SHOW INVALID TIMESERIES` statement, preventing the loss of original sequence information due to frequent modifications, significantly improving data traceability and problem localization efficiency.
439
+
- The new sequence does not support creating views. When modifying the encoding, compression, sequence type, tags, attributes, or alias of the new sequence, the original sequence will not be modified; deleting the new sequence will also modify the original sequence.
440
+
- If the new sequence path or the alias of the original sequence under the target device already exists (including real sequences, views, invalid sequences, and their aliases), the system will report an error.
441
+
442
+
Usage example:
443
+
444
+
```sql
445
+
ALTER TIMESERIES root.ln.wf01.wt01.temperature RENAME TO root.newln.newwf.newwt.temperature
446
+
```
447
+
448
+
449
+
### 2.4 Delete Timeseries
425
450
426
451
To delete the timeseries we created before, we are able to use `(DELETE | DROP) TimeSeries <PathPattern>` statement.
Explanation: The last column, "NewPath," in the returned result displays the new sequence corresponding to the invalidated sequence. This serves scenarios such as view construction and cluster migration (Load + rename).
619
+
580
620
581
-
### 2.5 Count Timeseries
621
+
### 2.6 Count Timeseries
582
622
583
623
IoTDB is able to use `COUNT TIMESERIES <Path>` to count the number of timeseries matching the path. SQL statements are as follows:
584
624
@@ -663,7 +703,7 @@ It costs 0.002s
663
703
664
704
> Note: The path of timeseries is just a filter condition, which has no relationship with the definition of level.
665
705
666
-
### 2.6 Active Timeseries Query
706
+
### 2.7 Active Timeseries Query
667
707
By adding WHERE time filter conditions to the existing SHOW/COUNT TIMESERIES, we can obtain time series with data within the specified time range.
668
708
669
709
It is important to note that in metadata queries with time filters, views are not considered; only the time series actually stored in the TsFile are taken into account.
@@ -703,7 +743,7 @@ count timeseries where time >= 15000 and time < 16000;
703
743
+-----------------+
704
744
```
705
745
Regarding the definition of active time series, data that can be queried normally is considered active, meaning time series that have been inserted but deleted are not included.
706
-
### 2.7 Tag and Attribute Management
746
+
### 2.8 Tag and Attribute Management
707
747
708
748
We can also add an alias, extra tag and attribute information while creating one timeseries.
| READ_DATA | Allows reading time series data under the authorized path. |
85
-
| WRITE_DATA | Allows reading time series data under the authorized path.<br/>Allows inserting and deleting time series data under the authorized path.<br/>Allows importing and loading data under the authorized path. When importing data, you need the WRITE_DATA permission for the corresponding path. When automatically creating databases or time series, you need MANAGE_DATABASE and WRITE_SCHEMA permissions. |
86
-
| READ_SCHEMA | Allows obtaining detailed information about the metadata tree under the authorized path, <br/>including databases, child paths, child nodes, devices, time series, templates, views, etc. |
87
-
| WRITE_SCHEMA | Allows obtaining detailed information about the metadata tree under the authorized path.<br/>Allows creating, deleting, and modifying time series, templates, views, etc. under the authorized path. When creating or modifying views, it checks the WRITE_SCHEMA permission for the view path and READ_SCHEMA permission for the data source. When querying and inserting data into views, it checks the READ_DATA and WRITE_DATA permissions for the view path.<br/> Allows setting, unsetting, and viewing TTL under the authorized path. <br/> Allows attaching or detaching templates under the authorized path. |
| READ_DATA | Allows reading time series data under the authorized path. |
85
+
| WRITE_DATA | Allows reading time series data under the authorized path.<br/>Allows inserting and deleting time series data under the authorized path.<br/>Allows importing and loading data under the authorized path. When importing data, you need the WRITE_DATA permission for the corresponding path. When automatically creating databases or time series, you need MANAGE_DATABASE and WRITE_SCHEMA permissions. |
86
+
| READ_SCHEMA | Allows obtaining detailed information about the metadata tree under the authorized path, <br/>including databases, child paths, child nodes, devices, time series, templates, views, etc. |
87
+
| WRITE_SCHEMA | Allows obtaining detailed information about the metadata tree under the authorized path.<br/>Allows creating, deleting, and modifying time series, templates, views, etc. under the authorized path. When creating or modifying views, it checks the WRITE_SCHEMA permission for the view path and READ_SCHEMA permission for the data source. When querying and inserting data into views, it checks the READ_DATA and WRITE_DATA permissions for the view path.<br/> Allows setting, unsetting, and viewing TTL under the authorized path. <br/> Allows attaching or detaching templates under the authorized path.<br/> Allowed to modify the full path name of a timeseries under an authorized path. -- Supported from V2.0.8 onwards|
Copy file name to clipboardExpand all lines: src/UserGuide/latest/Basic-Concept/Operate-Metadata_timecho.md
+45-5Lines changed: 45 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -421,7 +421,32 @@ You can set different datatype, encoding, and compression for the timeseries in
421
421
422
422
It is also supported to set an alias, tag, and attribute for aligned timeseries.
423
423
424
-
### 2.3 Delete Timeseries
424
+
### 2.3 Modifying Timeseries Name
425
+
426
+
Since version V2.0.8, it has been supported to modify the full path name of a timeseries through SQL statements. After a successful modification, the original name becomes invalid but is still retained in the metadata storage.
427
+
428
+
Syntax definition:
429
+
430
+
```sql
431
+
-- Supports modifying the full path of a certain sequence to another full path
432
+
ALTER TIMESERIES <oldPath> RENAME TO <newPath>
433
+
```
434
+
435
+
Usage instructions:
436
+
437
+
- This statement takes effect immediately upon successful execution, and the tags/attributes/alias of the original sequence will be migrated to the new sequence.
438
+
- The invalidated sequence (original sequence) no longer supports write, query, delete, or other operations. The name of the invalidated sequence will be retained by the system, and creating a new sequence with the same name is not allowed. This ensures the uniqueness and traceability of the original sequence name: it supports viewing the original sequence through the `SHOW INVALID TIMESERIES` statement, preventing the loss of original sequence information due to frequent modifications, significantly improving data traceability and problem localization efficiency.
439
+
- The new sequence does not support creating views. When modifying the encoding, compression, sequence type, tags, attributes, or alias of the new sequence, the original sequence will not be modified; deleting the new sequence will also modify the original sequence.
440
+
- If the new sequence path or the alias of the original sequence under the target device already exists (including real sequences, views, invalid sequences, and their aliases), the system will report an error.
441
+
442
+
Usage example:
443
+
444
+
```sql
445
+
ALTER TIMESERIES root.ln.wf01.wt01.temperature RENAME TO root.newln.newwf.newwt.temperature
446
+
```
447
+
448
+
449
+
### 2.4 Delete Timeseries
425
450
426
451
To delete the timeseries we created before, we are able to use `(DELETE | DROP) TimeSeries <PathPattern>` statement.
Explanation: The last column, "NewPath," in the returned result displays the new sequence corresponding to the invalidated sequence. This serves scenarios such as view construction and cluster migration (Load + rename).
619
+
580
620
581
-
### 2.5 Count Timeseries
621
+
### 2.6 Count Timeseries
582
622
583
623
IoTDB is able to use `COUNT TIMESERIES <Path>` to count the number of timeseries matching the path. SQL statements are as follows:
584
624
@@ -663,7 +703,7 @@ It costs 0.002s
663
703
664
704
> Note: The path of timeseries is just a filter condition, which has no relationship with the definition of level.
665
705
666
-
### 2.6 Active Timeseries Query
706
+
### 2.7 Active Timeseries Query
667
707
By adding WHERE time filter conditions to the existing SHOW/COUNT TIMESERIES, we can obtain time series with data within the specified time range.
668
708
669
709
It is important to note that in metadata queries with time filters, views are not considered; only the time series actually stored in the TsFile are taken into account.
@@ -703,7 +743,7 @@ count timeseries where time >= 15000 and time < 16000;
703
743
+-----------------+
704
744
```
705
745
Regarding the definition of active time series, data that can be queried normally is considered active, meaning time series that have been inserted but deleted are not included.
706
-
### 2.7 Tag and Attribute Management
746
+
### 2.8 Tag and Attribute Management
707
747
708
748
We can also add an alias, extra tag and attribute information while creating one timeseries.
0 commit comments