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
@@ -409,7 +409,32 @@ You can set different datatype, encoding, and compression for the timeseries in
409
409
410
410
It is also supported to set an alias, tag, and attribute for aligned timeseries.
411
411
412
-
### 2.3 Delete Timeseries
412
+
### 2.3 Modifying Timeseries Name
413
+
414
+
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.
415
+
416
+
Syntax definition:
417
+
418
+
```sql
419
+
-- Supports modifying the full path of a certain sequence to another full path
420
+
ALTER TIMESERIES <oldPath> RENAME TO <newPath>
421
+
```
422
+
423
+
Usage instructions:
424
+
425
+
- This statement takes effect immediately upon successful execution, and the tags/attributes/alias of the original sequence will be migrated to the new sequence.
426
+
- 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.
427
+
- 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.
428
+
- 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.
429
+
430
+
Usage example:
431
+
432
+
```sql
433
+
ALTER TIMESERIES root.ln.wf01.wt01.temperature RENAME TO root.newln.newwf.newwt.temperature
434
+
```
435
+
436
+
437
+
### 2.4 Delete Timeseries
413
438
414
439
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).
607
+
568
608
569
-
### 2.5 Count Timeseries
609
+
### 2.6 Count Timeseries
570
610
571
611
IoTDB is able to use `COUNT TIMESERIES <Path>` to count the number of timeseries matching the path. SQL statements are as follows:
572
612
@@ -651,7 +691,7 @@ It costs 0.002s
651
691
652
692
> Note: The path of timeseries is just a filter condition, which has no relationship with the definition of level.
653
693
654
-
### 2.6 Active Timeseries Query
694
+
### 2.7 Active Timeseries Query
655
695
By adding WHERE time filter conditions to the existing SHOW/COUNT TIMESERIES, we can obtain time series with data within the specified time range.
656
696
657
697
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.
@@ -691,7 +731,7 @@ IoTDB> count timeseries where time >= 15000 and time < 16000;
691
731
+-----------------+
692
732
```
693
733
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.
694
-
### 2.7 Tag and Attribute Management
734
+
### 2.8 Tag and Attribute Management
695
735
696
736
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
@@ -409,7 +409,32 @@ You can set different datatype, encoding, and compression for the timeseries in
409
409
410
410
It is also supported to set an alias, tag, and attribute for aligned timeseries.
411
411
412
-
### 2.3 Delete Timeseries
412
+
### 2.3 Modifying Timeseries Name
413
+
414
+
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.
415
+
416
+
Syntax definition:
417
+
418
+
```sql
419
+
-- Supports modifying the full path of a certain sequence to another full path
420
+
ALTER TIMESERIES <oldPath> RENAME TO <newPath>
421
+
```
422
+
423
+
Usage instructions:
424
+
425
+
- This statement takes effect immediately upon successful execution, and the tags/attributes/alias of the original sequence will be migrated to the new sequence.
426
+
- 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.
427
+
- 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.
428
+
- 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.
429
+
430
+
Usage example:
431
+
432
+
```sql
433
+
ALTER TIMESERIES root.ln.wf01.wt01.temperature RENAME TO root.newln.newwf.newwt.temperature
434
+
```
435
+
436
+
437
+
### 2.4 Delete Timeseries
413
438
414
439
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).
607
+
568
608
569
-
### 2.5 Count Timeseries
609
+
### 2.6 Count Timeseries
570
610
571
611
IoTDB is able to use `COUNT TIMESERIES <Path>` to count the number of timeseries matching the path. SQL statements are as follows:
572
612
@@ -651,7 +691,7 @@ It costs 0.002s
651
691
652
692
> Note: The path of timeseries is just a filter condition, which has no relationship with the definition of level.
653
693
654
-
### 2.6 Active Timeseries Query
694
+
### 2.7 Active Timeseries Query
655
695
By adding WHERE time filter conditions to the existing SHOW/COUNT TIMESERIES, we can obtain time series with data within the specified time range.
656
696
657
697
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.
@@ -691,7 +731,7 @@ IoTDB> count timeseries where time >= 15000 and time < 16000;
691
731
+-----------------+
692
732
```
693
733
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.
694
-
### 2.7 Tag and Attribute Management
734
+
### 2.8 Tag and Attribute Management
695
735
696
736
We can also add an alias, extra tag and attribute information while creating one timeseries.
0 commit comments