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/Table/User-Manual/Tree-to-Table_timecho.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,7 +161,7 @@ AS root.db.**
161
161
### 2.2 Modifying a Table View
162
162
#### 2.2.1 Syntax Definition
163
163
164
-
The ALTER VIEW function supports modifying the view name, adding columns, renaming columns, deleting columns, setting the view's TTL property, and adding comments via COMMENT.
164
+
The ALTER VIEW function supports modifying the view name, adding columns, renaming columns, modifying FIELD column data type (supported since V2.0.8), deleting columns, setting the view's TTL property, and adding comments via COMMENT.
ALTERVIEW [IF EXISTS] viewName ALTER COLUMN [IF EXISTS] columnName SET DATA TYPE new_type
181
+
179
182
-- Delete a column from the view
180
183
ALTERVIEW [IF EXISTS] viewName DROP COLUMN [IF EXISTS] columnName
181
184
@@ -191,6 +194,21 @@ COMMENT ON COLUMN qualifiedName '.' column=identifier IS (string | NULL) #commen
191
194
1. The `SET PROPERTIES`operation currently only supports configuring the TTL property for the table view.
192
195
2. The `DROP COLUMN`function only supports deleting FIELD columns; TAG columns cannot be deleted.
193
196
3. Modifying the comment will overwrite the original comment. If set to `null`, the previous comment will be erased.
197
+
4. When modifying the data type of a FIELD column, the new data type must be compatible with the original type. The specific compatibility is shown in the following table:
| INT32 | INT64, FLOAT, DOUBLE, TIMESTAMP, STRING, TEXT |
444
+
| INT64 | TIMESTAMP, DOUBLE, STRING, TEXT |
445
+
| FLOAT | DOUBLE, STRING, TEXT |
446
+
| DOUBLE | STRING, TEXT |
447
+
| BOOLEAN | STRING, TEXT |
448
+
| TEXT | BLOB, STRING |
449
+
| STRING | TEXT, BLOB |
450
+
| BLOB | STRING, TEXT |
451
+
| DATE | STRING, TEXT |
452
+
| TIMESTAMP | INT64, DOUBLE, STRING, TEXT |
453
+
454
+
Usage example:
455
+
456
+
```SQL
457
+
ALTER TIMESERIES root.ln.wf01.wt01.temperature set data type DOUBLE
458
+
```
459
+
460
+
### 2.4 Modifying Timeseries Name
425
461
426
462
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
463
@@ -446,7 +482,7 @@ ALTER TIMESERIES root.ln.wf01.wt01.temperature RENAME TO root.newln.newwf.newwt.
446
482
```
447
483
448
484
449
-
### 2.4 Delete Timeseries
485
+
### 2.5 Delete Timeseries
450
486
451
487
To delete the timeseries we created before, we are able to use `(DELETE | DROP) TimeSeries <PathPattern>` statement.
* SHOW LATEST? TIMESERIES pathPattern? whereClause? limitClause?
465
501
@@ -618,7 +654,7 @@ IoTDB> show invalid timeSeries
618
654
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
655
620
656
621
-
### 2.6 Count Timeseries
657
+
### 2.7 Count Timeseries
622
658
623
659
IoTDB is able to use `COUNT TIMESERIES <Path>` to count the number of timeseries matching the path. SQL statements are as follows:
624
660
@@ -703,7 +739,7 @@ It costs 0.002s
703
739
704
740
> Note: The path of timeseries is just a filter condition, which has no relationship with the definition of level.
705
741
706
-
### 2.7 Active Timeseries Query
742
+
### 2.8 Active Timeseries Query
707
743
By adding WHERE time filter conditions to the existing SHOW/COUNT TIMESERIES, we can obtain time series with data within the specified time range.
708
744
709
745
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.
@@ -743,7 +779,7 @@ count timeseries where time >= 15000 and time < 16000;
743
779
+-----------------+
744
780
```
745
781
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.
746
-
### 2.8 Tag and Attribute Management
782
+
### 2.9 Tag and Attribute Management
747
783
748
784
We can also add an alias, extra tag and attribute information while creating one timeseries.
Copy file name to clipboardExpand all lines: src/UserGuide/latest-Table/User-Manual/Tree-to-Table_timecho.md
+22-1Lines changed: 22 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -161,7 +161,7 @@ AS root.db.**
161
161
### 2.2 Modifying a Table View
162
162
#### 2.2.1 Syntax Definition
163
163
164
-
The ALTER VIEW function supports modifying the view name, adding columns, renaming columns, deleting columns, setting the view's TTL property, and adding comments via COMMENT.
164
+
The ALTER VIEW function supports modifying the view name, adding columns, renaming columns, modifying FIELD column data type (supported since V2.0.8), deleting columns, setting the view's TTL property, and adding comments via COMMENT.
ALTERVIEW [IF EXISTS] viewName ALTER COLUMN [IF EXISTS] columnName SET DATA TYPE new_type
181
+
179
182
-- Delete a column from the view
180
183
ALTERVIEW [IF EXISTS] viewName DROP COLUMN [IF EXISTS] columnName
181
184
@@ -191,6 +194,21 @@ COMMENT ON COLUMN qualifiedName '.' column=identifier IS (string | NULL) #commen
191
194
1. The `SET PROPERTIES`operation currently only supports configuring the TTL property for the table view.
192
195
2. The `DROP COLUMN`function only supports deleting FIELD columns; TAG columns cannot be deleted.
193
196
3. Modifying the comment will overwrite the original comment. If set to `null`, the previous comment will be erased.
197
+
4. When modifying the data type of a FIELD column, the new data type must be compatible with the original type. The specific compatibility is shown in the following table:
0 commit comments