Skip to content

Commit 2d05ff9

Browse files
merge: from 3.3.8 to main branch #34196
2 parents 2fb1688 + 761f2c4 commit 2d05ff9

File tree

12 files changed

+417
-376
lines changed

12 files changed

+417
-376
lines changed

.github/workflows/new-framework-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ on:
55
branches:
66
- '3.0'
77
- 'main'
8-
- '3.3.6'
8+
- '3.3.8'
99
paths-ignore:
1010
- 'packaging/**'
1111
- 'docs/**'

docs/en/05-basic/02-insert.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -16,23 +16,23 @@ Assume that the smart meter with device ID d1001 collected data on October 3, 20
1616

1717
1. You can write time-series data into the subtable d1001 using the following INSERT statement.
1818

19-
```sql
20-
insert into d1001 (ts, current, voltage, phase) values ( "2018-10-03 14:38:05", 10.3, 219, 0.31)
21-
```
19+
```sql
20+
INSERT INTO d1001 (ts, current, voltage, phase) VALUES ("2018-10-03 14:38:05", 10.3, 219, 0.31);
21+
```
2222

23-
The above SQL writes `2018-10-03 14:38:05`, `10.3`, `219`, `0.31` into the columns `ts`, `current`, `voltage`, `phase` of the subtable `d1001`.
23+
The above SQL writes `2018-10-03 14:38:05`, `10.3`, `219`, `0.31` into the columns `ts`, `current`, `voltage`, `phase` of the subtable `d1001`.
2424

2525
1. When the `VALUES` part of the `INSERT` statement includes all columns of the table, the list of fields before `VALUES` can be omitted, as shown in the following SQL statement, which has the same effect as the previous INSERT statement specifying columns.
2626

27-
```sql
28-
insert into d1001 values("2018-10-03 14:38:05", 10.3, 219, 0.31)
29-
```
27+
```sql
28+
INSERT INTO d1001 VALUES ("2018-10-03 14:38:05", 10.3, 219, 0.31);
29+
```
3030

3131
1. For the table's timestamp column (the first column), you can also directly use the timestamp of the database precision.
3232

33-
```sql
34-
INSERT INTO d1001 VALUES (1538548685000, 10.3, 219, 0.31);
35-
```
33+
```sql
34+
INSERT INTO d1001 VALUES (1538548685000, 10.3, 219, 0.31);
35+
```
3636

3737
The effects of the above three SQL statements are exactly the same.
3838

@@ -41,10 +41,10 @@ The effects of the above three SQL statements are exactly the same.
4141
Assume that the smart meter with device ID d1001 collects data every 10s and reports data every 30s, i.e., it needs to write 3 records every 30s. Users can write multiple records in one insert statement. The following SQL writes a total of 3 records.
4242

4343
```sql
44-
insert into d1001 values
45-
( "2018-10-03 14:38:05", 10.2, 220, 0.23),
46-
( "2018-10-03 14:38:15", 12.6, 218, 0.33),
47-
( "2018-10-03 14:38:25", 12.3, 221, 0.31)
44+
INSERT INTO d1001 VALUES
45+
("2018-10-03 14:38:05", 10.2, 220, 0.23),
46+
("2018-10-03 14:38:15", 12.6, 218, 0.33),
47+
("2018-10-03 14:38:25", 12.3, 221, 0.31);
4848
```
4949

5050
The above SQL writes a total of three records.
@@ -76,18 +76,18 @@ The above SQL writes a total of nine records.
7676
You can write data to specific columns of a table by specifying columns. Columns not appearing in the SQL will be automatically filled with NULL values. Note that the timestamp column must be present, and its value cannot be NULL. The following SQL writes one record to the subtable d1004. This record only includes voltage and phase, with the current value being NULL.
7777

7878
```sql
79-
insert into d1004 (ts, voltage, phase) values("2018-10-04 14:38:06", 223, 0.29)
79+
INSERT INTO d1004 (ts, voltage, phase) VALUES ("2018-10-04 14:38:06", 223, 0.29);
8080
```
8181

8282
### Automatic Table Creation on Insert
8383

8484
Users can perform inserts using the `using` keyword for automatic table creation. If the subtable does not exist, it triggers automatic table creation before data insertion; if the subtable already exists, it directly inserts the data. An insert statement with automatic table creation can also specify only some tag columns for insertion, leaving the unspecified tag columns as NULL values. The following SQL inserts a record. If the subtable d1005 does not exist, it first creates the table automatically with the tag `group_id` value as NULL, then inserts the data.
8585

8686
```sql
87-
insert into d1005
88-
using meters (location)
89-
tags ( "beijing.chaoyang")
90-
values ( "2018-10-04 14:38:07", 10.15, 217, 0.33)
87+
INSERT INTO d1005
88+
USING meters (location)
89+
TAGS ("California.SanFrancisco")
90+
VALUES ("2018-10-04 14:38:07", 10.15, 217, 0.33);
9191
```
9292

9393
The insert statement with automatic table creation also supports inserting data into multiple tables in one statement. The following SQL uses an automatic table creation insert statement to insert 9 records.
@@ -113,8 +113,8 @@ d1003 USING meters TAGS ("California.LosAngeles", 2) VALUES
113113
TDengine also supports direct data insertion into supertables. It is important to note that a supertable is a template and does not store data itself; the data is stored in the corresponding subtables. The following SQL inserts a record into the subtable d1001 by specifying the tbname column.
114114

115115
```sql
116-
insert into meters (tbname, ts, current, voltage, phase, location, group_id)
117-
values( "d1001, "2018-10-03 14:38:05", 10.2, 220, 0.23, "California.SanFrancisco", 2)
116+
INSERT INTO meters (tbname, ts, current, voltage, phase, location, group_id)
117+
VALUES ("d1001", "2018-10-03 14:38:05", 10.2, 220, 0.23, "California.SanFrancisco", 2);
118118
```
119119

120120
### Zero-Code Insertion
@@ -134,5 +134,5 @@ INSERT INTO d1001 (ts, current) VALUES ("2018-10-03 14:38:05", 22);
134134
To facilitate the cleanup of abnormal data caused by equipment failures and other reasons, TDengine supports deleting time-series data based on timestamps. The following SQL deletes all data in the supertable `meters` with timestamps earlier than `2021-10-01 10:40:00.100`. Data deletion is irreversible, so use it with caution. To ensure that the data being deleted is indeed what you want to delete, it is recommended to first use a select statement with the deletion condition in the where clause to view the data to be deleted, and confirm it is correct before executing delete.
135135

136136
```sql
137-
delete from meters where ts < '2021-10-01 10:40:00.100' ;
137+
DELETE FROM meters WHERE ts < '2021-10-01 10:40:00.100';
138138
```

docs/en/06-advanced/06-tdgpt/06-anomaly-detection/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ SELECT _wstart, _wend, SUM(i32)
5555
FROM foo
5656
ANOMALY_WINDOW(i32, "algo=ksigma,k=2");
5757

58-
taos> SELECT _wstart, _wend, count(*) FROM foo ANOMAYL_WINDOW(i32);
58+
taos> SELECT _wstart, _wend, count(*) FROM foo ANOMALY_WINDOW(i32);
5959
_wstart | _wend | count(*) |
6060
====================================================================
6161
2020-01-01 00:00:16.000 | 2020-01-01 00:00:17.000 | 2 |

docs/en/08-operation/09-backup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ TDengine Enterprise implements incremental backup and recovery of data by using
3838
1. Incremental data backup: Based on TDengine's data subscription function, all data changes of **the backup object** (including: addition, modification, deletion, metadata change, etc.) are recorded to generate a backup file.
3939
2. Data recovery: Use the backup file generated by incremental data backup to restore **the backup object** to a specified point in time.
4040
3. Backup object: The object that the user backs up can be a **database** or a **supertable**.
41-
4. Backup plan: The user creates a periodic backup task for the backup object. The backup plan starts at a specified time point and periodically executes the backup task at intervals of **the backup cycle. Each backup task generates a** **backup point** .
41+
4. Backup plan: The user creates a periodic backup task for the backup object. The backup plan starts at a specified time point and periodically executes the backup task at intervals of **the backup cycle.** Each backup task generates a **backup point** .
4242
5. Backup point: Each time a backup task is executed, a set of backup files is generated. They correspond to a time point, called **a backup point** . The first backup point is called **the initial backup point** .
4343
6. Restore task: The user selects a backup point in the backup plan and creates a restore task. The restore task starts from **the initial backup point** and plays back the data changes in **the backup file** one by one until the specified backup point ends.
4444

docs/en/08-operation/10-disaster.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,4 @@ The following steps describe how to easily set up a data disaster recovery syste
3030

3131
- Step 5: Add a data synchronization task on the "System Management - Data Synchronization" page of the taosExplorer service, fill in the configuration information of the task with the database db1 to be synchronized and the target database db2's DSN, and start data synchronization after creating the task.
3232

33-
- Step 6: Access Cluster B, and you can see that the database db2 in Cluster B continuously writes data from the database db1 in Cluster A until the data volumes of the databases in both clusters are roughly equal. At this point, a simple data disaster recovery system based on
34-
35-
TDengine Enterprise is set up.
33+
- Step 6: Access Cluster B, and you can see that the database db2 in Cluster B continuously writes data from the database db1 in Cluster A until the data volumes of the databases in both clusters are roughly equal. At this point, a simple data disaster recovery system based on TDengine Enterprise is set up.

docs/en/28-releases/01-tdengine.md

Lines changed: 0 additions & 228 deletions
This file was deleted.

0 commit comments

Comments
 (0)