Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/UserGuide/Master/Table/API/Programming-Go-Native-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func main() {

checkError(session.ExecuteNonQueryStatement("create database test_db"))
checkError(session.ExecuteNonQueryStatement("use test_db"))
checkError(session.ExecuteNonQueryStatement("create table t1 (id1 string id, id2 string id, s1 text measurement, s2 text measurement)"))
checkError(session.ExecuteNonQueryStatement("create table t1 (id1 string tag, id2 string tag, s1 text field, s2 text field)"))
insertRelationalTablet(session)
showTables(session)
query(session)
Expand Down Expand Up @@ -253,7 +253,7 @@ func insertRelationalTablet(session client.ITableSession) {
Measurement: "s2",
DataType: client.TEXT,
},
}, []client.ColumnCategory{client.ID, client.ID, client.MEASUREMENT, client.MEASUREMENT}, 1024)
}, []client.ColumnCategory{client.TAG, client.TAG, client.FIELD, client.FIELD}, 1024)
if err != nil {
log.Fatal("Failed to create relational tablet {}", err)
}
Expand Down Expand Up @@ -462,7 +462,7 @@ func putBackToSessionPoolExample() {
}()
checkError(session.ExecuteNonQueryStatement("create database " + dbName))
checkError(session.ExecuteNonQueryStatement("use " + dbName))
checkError(session.ExecuteNonQueryStatement("create table table_of_" + dbName + " (id1 string id, id2 string id, s1 text measurement, s2 text measurement)"))
checkError(session.ExecuteNonQueryStatement("create table table_of_" + dbName + " (id1 string tag, id2 string tag, s1 text field, s2 text field)"))
}()
}
wg.Wait()
Expand Down Expand Up @@ -520,7 +520,7 @@ func sessionPoolWithSpecificDatabaseExample() {
return
}
defer session.Close()
checkError(session.ExecuteNonQueryStatement("create table " + tableName + " (id1 string id, id2 string id, s1 text measurement, s2 text measurement)"))
checkError(session.ExecuteNonQueryStatement("create table " + tableName + " (id1 string tag, id2 string tag, s1 text field, s2 text field)"))
}()
}
wg.Wait()
Expand Down Expand Up @@ -550,7 +550,7 @@ func sessionPoolWithoutSpecificDatabaseExample() {
defer session.Close()
checkError(session.ExecuteNonQueryStatement("create database " + dbName))
checkError(session.ExecuteNonQueryStatement("use " + dbName))
checkError(session.ExecuteNonQueryStatement("create table t1 (id1 string id, id2 string id, s1 text measurement, s2 text measurement)"))
checkError(session.ExecuteNonQueryStatement("create table t1 (id1 string tag, id2 string tag, s1 text field, s2 text field)"))
}()
}
wg.Wait()
Expand Down
4 changes: 2 additions & 2 deletions src/UserGuide/Master/Table/API/Programming-JDBC_apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ public class TableModelJDBCExample {

// or use full qualified table name
statement.execute(
"create table test1.table1(region_id STRING ID, plant_id STRING ID, device_id STRING ID, model STRING ATTRIBUTE, temperature FLOAT MEASUREMENT, humidity DOUBLE MEASUREMENT) with (TTL=3600000)");
"create table test1.table1(region_id STRING TAG, plant_id STRING TAG, device_id STRING TAG, model STRING ATTRIBUTE, temperature FLOAT FIELD, humidity DOUBLE FIELD) with (TTL=3600000)");

statement.execute(
"create table table2(region_id STRING ID, plant_id STRING ID, color STRING ATTRIBUTE, temperature FLOAT MEASUREMENT, speed DOUBLE MEASUREMENT) with (TTL=6600000)");
"create table table2(region_id STRING TAG, plant_id STRING TAG, color STRING ATTRIBUTE, temperature FLOAT FIELD, speed DOUBLE FIELD) with (TTL=6600000)");

// show tables from current database
try (ResultSet resultSet = statement.executeQuery("SHOW TABLES")) {
Expand Down
4 changes: 2 additions & 2 deletions src/UserGuide/Master/Table/API/Programming-JDBC_timecho.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ public class TableModelJDBCExample {

// or use full qualified table name
statement.execute(
"create table test1.table1(region_id STRING ID, plant_id STRING ID, device_id STRING ID, model STRING ATTRIBUTE, temperature FLOAT MEASUREMENT, humidity DOUBLE MEASUREMENT) with (TTL=3600000)");
"create table test1.table1(region_id STRING TAG, plant_id STRING TAG, device_id STRING TAG, model STRING ATTRIBUTE, temperature FLOAT FIELD, humidity DOUBLE FIELD) with (TTL=3600000)");

statement.execute(
"create table table2(region_id STRING ID, plant_id STRING ID, color STRING ATTRIBUTE, temperature FLOAT MEASUREMENT, speed DOUBLE MEASUREMENT) with (TTL=6600000)");
"create table table2(region_id STRING TAG, plant_id STRING TAG, color STRING ATTRIBUTE, temperature FLOAT FIELD, speed DOUBLE FIELD) with (TTL=6600000)");

// show tables from current database
try (ResultSet resultSet = statement.executeQuery("SHOW TABLES")) {
Expand Down
24 changes: 12 additions & 12 deletions src/UserGuide/Master/Table/API/Programming-Python-Native-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ IoTDB provides a Python native client driver and a session pool management mecha

To use the IoTDB Python API, install the required package using pip:

```Java
```shell
pip3 install apache-iotdb>=2.0
```

Expand Down Expand Up @@ -175,7 +175,7 @@ class TableSessionConfig(object):

#### Sample Code

```Java
```Python
def get_session(self) -> TableSession:
"""
Retrieve a new TableSession instance.
Expand Down Expand Up @@ -223,7 +223,7 @@ def close(self):

#### Sample Code

```Java
```Python
class TableSessionPoolConfig(object):
"""
Configuration class for a TableSessionPool.
Expand Down Expand Up @@ -283,7 +283,7 @@ class TableSessionPoolConfig(object):

In the `conf/iotdb-system.properties` configuration file, locate or add the following configuration items:

```Java
```
enable_thrift_ssl=true
key_store_path=/path/to/your/server_keystore.jks
key_store_pwd=your_keystore_password
Expand All @@ -294,13 +294,13 @@ key_store_pwd=your_keystore_password
- Set `use_ssl` to True to enable SSL.
- Specify the client certificate path using the `ca_certs` parameter.

```Java
```
use_ssl = True
ca_certs = "/path/to/your/server.crt" # 或 ca_certs = "/path/to/your//ca_cert.pem"
```
**Example Code: Using SSL to Connect to IoTDB**

```Java
```Python
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
Expand Down Expand Up @@ -379,7 +379,7 @@ if __name__ == "__main__":

Here is an excerpt of the sample code:

```Java
```Python
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
Expand Down Expand Up @@ -414,14 +414,14 @@ def prepare_data():
session.execute_non_query_statement("CREATE DATABASE IF NOT EXISTS db1")
session.execute_non_query_statement('USE "db1"')
session.execute_non_query_statement(
"CREATE TABLE table0 (id1 string id, attr1 string attribute, "
"CREATE TABLE table0 (id1 string tag, attr1 string attribute, "
+ "m1 double "
+ "measurement)"
+ "field)"
)
session.execute_non_query_statement(
"CREATE TABLE table1 (id1 string id, attr1 string attribute, "
"CREATE TABLE table1 (id1 string tag, attr1 string attribute, "
+ "m1 double "
+ "measurement)"
+ "field)"
)

print("now the tables are:")
Expand All @@ -447,7 +447,7 @@ def insert_data(num: int):
TSDataType.STRING,
TSDataType.DOUBLE,
]
column_types = [ColumnType.ID, ColumnType.ATTRIBUTE, ColumnType.MEASUREMENT]
column_types = [ColumnType.TAG, ColumnType.ATTRIBUTE, ColumnType.FIELD]
timestamps = []
values = []
for row in range(15):
Expand Down
10 changes: 5 additions & 5 deletions src/UserGuide/latest-Table/API/Programming-Go-Native-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ func main() {

checkError(session.ExecuteNonQueryStatement("create database test_db"))
checkError(session.ExecuteNonQueryStatement("use test_db"))
checkError(session.ExecuteNonQueryStatement("create table t1 (id1 string id, id2 string id, s1 text measurement, s2 text measurement)"))
checkError(session.ExecuteNonQueryStatement("create table t1 (id1 string tag, id2 string tag, s1 text field, s2 text field)"))
insertRelationalTablet(session)
showTables(session)
query(session)
Expand Down Expand Up @@ -253,7 +253,7 @@ func insertRelationalTablet(session client.ITableSession) {
Measurement: "s2",
DataType: client.TEXT,
},
}, []client.ColumnCategory{client.ID, client.ID, client.MEASUREMENT, client.MEASUREMENT}, 1024)
}, []client.ColumnCategory{client.TAG, client.TAG, client.FIELD, client.FIELD}, 1024)
if err != nil {
log.Fatal("Failed to create relational tablet {}", err)
}
Expand Down Expand Up @@ -462,7 +462,7 @@ func putBackToSessionPoolExample() {
}()
checkError(session.ExecuteNonQueryStatement("create database " + dbName))
checkError(session.ExecuteNonQueryStatement("use " + dbName))
checkError(session.ExecuteNonQueryStatement("create table table_of_" + dbName + " (id1 string id, id2 string id, s1 text measurement, s2 text measurement)"))
checkError(session.ExecuteNonQueryStatement("create table table_of_" + dbName + " (id1 string tag, id2 string tag, s1 text field, s2 text field)"))
}()
}
wg.Wait()
Expand Down Expand Up @@ -520,7 +520,7 @@ func sessionPoolWithSpecificDatabaseExample() {
return
}
defer session.Close()
checkError(session.ExecuteNonQueryStatement("create table " + tableName + " (id1 string id, id2 string id, s1 text measurement, s2 text measurement)"))
checkError(session.ExecuteNonQueryStatement("create table " + tableName + " (id1 string tag, id2 string tag, s1 text field, s2 text field)"))
}()
}
wg.Wait()
Expand Down Expand Up @@ -550,7 +550,7 @@ func sessionPoolWithoutSpecificDatabaseExample() {
defer session.Close()
checkError(session.ExecuteNonQueryStatement("create database " + dbName))
checkError(session.ExecuteNonQueryStatement("use " + dbName))
checkError(session.ExecuteNonQueryStatement("create table t1 (id1 string id, id2 string id, s1 text measurement, s2 text measurement)"))
checkError(session.ExecuteNonQueryStatement("create table t1 (id1 string tag, id2 string tag, s1 text field, s2 text field)"))
}()
}
wg.Wait()
Expand Down
2 changes: 1 addition & 1 deletion src/UserGuide/latest-Table/API/Programming-JDBC_apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public class TableModelJDBCExample {

// or use full qualified table name
statement.execute(
"create table test1.table1(region_id STRING ID, plant_id STRING ID, device_id STRING ID, model STRING ATTRIBUTE, temperature FLOAT MEASUREMENT, humidity DOUBLE MEASUREMENT) with (TTL=3600000)");
"create table test1.table1(region_id STRING TAG, plant_id STRING TAG, device_id STRING TAG, model STRING ATTRIBUTE, temperature FLOAT FIELD, humidity DOUBLE FIELD) with (TTL=3600000)");

statement.execute(
"create table table2(region_id STRING ID, plant_id STRING ID, color STRING ATTRIBUTE, temperature FLOAT MEASUREMENT, speed DOUBLE MEASUREMENT) with (TTL=6600000)");
Expand Down
4 changes: 2 additions & 2 deletions src/UserGuide/latest-Table/API/Programming-JDBC_timecho.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,10 @@ public class TableModelJDBCExample {

// or use full qualified table name
statement.execute(
"create table test1.table1(region_id STRING ID, plant_id STRING ID, device_id STRING ID, model STRING ATTRIBUTE, temperature FLOAT MEASUREMENT, humidity DOUBLE MEASUREMENT) with (TTL=3600000)");
"create table test1.table1(region_id STRING TAG, plant_id STRING TAG, device_id STRING TAG, model STRING ATTRIBUTE, temperature FLOAT FIELD, humidity DOUBLE FIELD) with (TTL=3600000)");

statement.execute(
"create table table2(region_id STRING ID, plant_id STRING ID, color STRING ATTRIBUTE, temperature FLOAT MEASUREMENT, speed DOUBLE MEASUREMENT) with (TTL=6600000)");
"create table table2(region_id STRING TAG, plant_id STRING TAG, color STRING ATTRIBUTE, temperature FLOAT FIELD, speed DOUBLE FIELD) with (TTL=6600000)");

// show tables from current database
try (ResultSet resultSet = statement.executeQuery("SHOW TABLES")) {
Expand Down
22 changes: 11 additions & 11 deletions src/UserGuide/latest-Table/API/Programming-Python-Native-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ IoTDB provides a Python native client driver and a session pool management mecha

To use the IoTDB Python API, install the required package using pip:

```Java
```shell
pip3 install apache-iotdb>=2.0
```

Expand Down Expand Up @@ -175,7 +175,7 @@ class TableSessionConfig(object):

#### Sample Code

```Java
```Python
def get_session(self) -> TableSession:
"""
Retrieve a new TableSession instance.
Expand Down Expand Up @@ -223,7 +223,7 @@ def close(self):

#### Sample Code

```Java
```Python
class TableSessionPoolConfig(object):
"""
Configuration class for a TableSessionPool.
Expand Down Expand Up @@ -283,7 +283,7 @@ class TableSessionPoolConfig(object):

In the `conf/iotdb-system.properties` configuration file, locate or add the following configuration items:

```Java
```
enable_thrift_ssl=true
key_store_path=/path/to/your/server_keystore.jks
key_store_pwd=your_keystore_password
Expand All @@ -294,13 +294,13 @@ key_store_pwd=your_keystore_password
- Set `use_ssl` to True to enable SSL.
- Specify the client certificate path using the `ca_certs` parameter.

```Java
```
use_ssl = True
ca_certs = "/path/to/your/server.crt" # 或 ca_certs = "/path/to/your//ca_cert.pem"
```
**Example Code: Using SSL to Connect to IoTDB**

```Java
```Python
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
Expand Down Expand Up @@ -379,7 +379,7 @@ if __name__ == "__main__":

Here is an excerpt of the sample code:

```Java
```Python
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
Expand Down Expand Up @@ -416,12 +416,12 @@ def prepare_data():
session.execute_non_query_statement(
"CREATE TABLE table0 (id1 string id, attr1 string attribute, "
+ "m1 double "
+ "measurement)"
+ "field)"
)
session.execute_non_query_statement(
"CREATE TABLE table1 (id1 string id, attr1 string attribute, "
"CREATE TABLE table1 (id1 string tag, attr1 string attribute, "
+ "m1 double "
+ "measurement)"
+ "field)"
)

print("now the tables are:")
Expand All @@ -447,7 +447,7 @@ def insert_data(num: int):
TSDataType.STRING,
TSDataType.DOUBLE,
]
column_types = [ColumnType.ID, ColumnType.ATTRIBUTE, ColumnType.MEASUREMENT]
column_types = [ColumnType.TAG, ColumnType.ATTRIBUTE, ColumnType.FIELD]
timestamps = []
values = []
for row in range(15):
Expand Down
10 changes: 5 additions & 5 deletions src/zh/UserGuide/Master/Table/API/Programming-Go-Native-API.md
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ func main() {

checkError(session.ExecuteNonQueryStatement("create database test_db"))
checkError(session.ExecuteNonQueryStatement("use test_db"))
checkError(session.ExecuteNonQueryStatement("create table t1 (id1 string id, id2 string id, s1 text measurement, s2 text measurement)"))
checkError(session.ExecuteNonQueryStatement("create table t1 (id1 string tag, id2 string tag, s1 text field, s2 text field)"))
insertRelationalTablet(session)
showTables(session)
query(session)
Expand Down Expand Up @@ -275,7 +275,7 @@ func insertRelationalTablet(session client.ITableSession) {
Measurement: "s2",
DataType: client.TEXT,
},
}, []client.ColumnCategory{client.ID, client.ID, client.MEASUREMENT, client.MEASUREMENT}, 1024)
}, []client.ColumnCategory{client.TAG, client.TAG, client.FIELD, client.FIELD}, 1024)
if err != nil {
log.Fatal("Failed to create relational tablet {}", err)
}
Expand Down Expand Up @@ -484,7 +484,7 @@ func putBackToSessionPoolExample() {
}()
checkError(session.ExecuteNonQueryStatement("create database " + dbName))
checkError(session.ExecuteNonQueryStatement("use " + dbName))
checkError(session.ExecuteNonQueryStatement("create table table_of_" + dbName + " (id1 string id, id2 string id, s1 text measurement, s2 text measurement)"))
checkError(session.ExecuteNonQueryStatement("create table table_of_" + dbName + " (id1 string tag, id2 string tag, s1 text field, s2 text field)"))
}()
}
wg.Wait()
Expand Down Expand Up @@ -542,7 +542,7 @@ func sessionPoolWithSpecificDatabaseExample() {
return
}
defer session.Close()
checkError(session.ExecuteNonQueryStatement("create table " + tableName + " (id1 string id, id2 string id, s1 text measurement, s2 text measurement)"))
checkError(session.ExecuteNonQueryStatement("create table " + tableName + " (id1 string tag, id2 string tag, s1 text field, s2 text field)"))
}()
}
wg.Wait()
Expand Down Expand Up @@ -572,7 +572,7 @@ func sessionPoolWithoutSpecificDatabaseExample() {
defer session.Close()
checkError(session.ExecuteNonQueryStatement("create database " + dbName))
checkError(session.ExecuteNonQueryStatement("use " + dbName))
checkError(session.ExecuteNonQueryStatement("create table t1 (id1 string id, id2 string id, s1 text measurement, s2 text measurement)"))
checkError(session.ExecuteNonQueryStatement("create table t1 (id1 string tag, id2 string tag, s1 text field, s2 text field)"))
}()
}
wg.Wait()
Expand Down
4 changes: 2 additions & 2 deletions src/zh/UserGuide/Master/Table/API/Programming-JDBC_apache.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ public class TableModelJDBCExample {

// or use full qualified table name
statement.execute(
"create table test1.table1(region_id STRING ID, plant_id STRING ID, device_id STRING ID, model STRING ATTRIBUTE, temperature FLOAT MEASUREMENT, humidity DOUBLE MEASUREMENT) with (TTL=3600000)");
"create table test1.table1(region_id STRING TAG, plant_id STRING TAG, device_id STRING TAG, model STRING ATTRIBUTE, temperature FLOAT FIELD, humidity DOUBLE FIELD) with (TTL=3600000)");

statement.execute(
"create table table2(region_id STRING ID, plant_id STRING ID, color STRING ATTRIBUTE, temperature FLOAT MEASUREMENT, speed DOUBLE MEASUREMENT) with (TTL=6600000)");
"create table table2(region_id STRING TAG, plant_id STRING TAG, color STRING ATTRIBUTE, temperature FLOAT FIELD, speed DOUBLE FIELD) with (TTL=6600000)");

// show tables from current database
try (ResultSet resultSet = statement.executeQuery("SHOW TABLES")) {
Expand Down
4 changes: 2 additions & 2 deletions src/zh/UserGuide/Master/Table/API/Programming-JDBC_timecho.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,10 +133,10 @@ public class TableModelJDBCExample {

// or use full qualified table name
statement.execute(
"create table test1.table1(region_id STRING ID, plant_id STRING ID, device_id STRING ID, model STRING ATTRIBUTE, temperature FLOAT MEASUREMENT, humidity DOUBLE MEASUREMENT) with (TTL=3600000)");
"create table test1.table1(region_id STRING TAG, plant_id STRING TAG, device_id STRING TAG, model STRING ATTRIBUTE, temperature FLOAT FIELD, humidity DOUBLE FIELD) with (TTL=3600000)");

statement.execute(
"create table table2(region_id STRING ID, plant_id STRING ID, color STRING ATTRIBUTE, temperature FLOAT MEASUREMENT, speed DOUBLE MEASUREMENT) with (TTL=6600000)");
"create table table2(region_id STRING TAG, plant_id STRING TAG, color STRING ATTRIBUTE, temperature FLOAT FIELD, speed DOUBLE FIELD) with (TTL=6600000)");

// show tables from current database
try (ResultSet resultSet = statement.executeQuery("SHOW TABLES")) {
Expand Down
Loading