diff --git a/src/UserGuide/Master/Table/API/Programming-Go-Native-API.md b/src/UserGuide/Master/Table/API/Programming-Go-Native-API.md index 27cb533d5..a0cbb6ff2 100644 --- a/src/UserGuide/Master/Table/API/Programming-Go-Native-API.md +++ b/src/UserGuide/Master/Table/API/Programming-Go-Native-API.md @@ -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) @@ -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) } @@ -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() @@ -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() @@ -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() diff --git a/src/UserGuide/Master/Table/API/Programming-JDBC_apache.md b/src/UserGuide/Master/Table/API/Programming-JDBC_apache.md index 69c64c77b..118e509f0 100644 --- a/src/UserGuide/Master/Table/API/Programming-JDBC_apache.md +++ b/src/UserGuide/Master/Table/API/Programming-JDBC_apache.md @@ -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")) { diff --git a/src/UserGuide/Master/Table/API/Programming-JDBC_timecho.md b/src/UserGuide/Master/Table/API/Programming-JDBC_timecho.md index 574b13826..188e0721b 100644 --- a/src/UserGuide/Master/Table/API/Programming-JDBC_timecho.md +++ b/src/UserGuide/Master/Table/API/Programming-JDBC_timecho.md @@ -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")) { diff --git a/src/UserGuide/Master/Table/API/Programming-Python-Native-API.md b/src/UserGuide/Master/Table/API/Programming-Python-Native-API.md index 8b1b79bb1..3ad3483ea 100644 --- a/src/UserGuide/Master/Table/API/Programming-Python-Native-API.md +++ b/src/UserGuide/Master/Table/API/Programming-Python-Native-API.md @@ -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 ``` @@ -175,7 +175,7 @@ class TableSessionConfig(object): #### Sample Code -```Java +```Python def get_session(self) -> TableSession: """ Retrieve a new TableSession instance. @@ -223,7 +223,7 @@ def close(self): #### Sample Code -```Java +```Python class TableSessionPoolConfig(object): """ Configuration class for a TableSessionPool. @@ -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 @@ -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 @@ -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 @@ -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:") @@ -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): diff --git a/src/UserGuide/latest-Table/API/Programming-Go-Native-API.md b/src/UserGuide/latest-Table/API/Programming-Go-Native-API.md index 27cb533d5..a0cbb6ff2 100644 --- a/src/UserGuide/latest-Table/API/Programming-Go-Native-API.md +++ b/src/UserGuide/latest-Table/API/Programming-Go-Native-API.md @@ -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) @@ -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) } @@ -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() @@ -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() @@ -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() diff --git a/src/UserGuide/latest-Table/API/Programming-JDBC_apache.md b/src/UserGuide/latest-Table/API/Programming-JDBC_apache.md index f27de6e04..c19725a8d 100644 --- a/src/UserGuide/latest-Table/API/Programming-JDBC_apache.md +++ b/src/UserGuide/latest-Table/API/Programming-JDBC_apache.md @@ -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)"); diff --git a/src/UserGuide/latest-Table/API/Programming-JDBC_timecho.md b/src/UserGuide/latest-Table/API/Programming-JDBC_timecho.md index 4e8a35626..2767e036d 100644 --- a/src/UserGuide/latest-Table/API/Programming-JDBC_timecho.md +++ b/src/UserGuide/latest-Table/API/Programming-JDBC_timecho.md @@ -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")) { diff --git a/src/UserGuide/latest-Table/API/Programming-Python-Native-API.md b/src/UserGuide/latest-Table/API/Programming-Python-Native-API.md index 8b1b79bb1..f2bc616c0 100644 --- a/src/UserGuide/latest-Table/API/Programming-Python-Native-API.md +++ b/src/UserGuide/latest-Table/API/Programming-Python-Native-API.md @@ -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 ``` @@ -175,7 +175,7 @@ class TableSessionConfig(object): #### Sample Code -```Java +```Python def get_session(self) -> TableSession: """ Retrieve a new TableSession instance. @@ -223,7 +223,7 @@ def close(self): #### Sample Code -```Java +```Python class TableSessionPoolConfig(object): """ Configuration class for a TableSessionPool. @@ -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 @@ -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 @@ -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 @@ -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:") @@ -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): diff --git a/src/zh/UserGuide/Master/Table/API/Programming-Go-Native-API.md b/src/zh/UserGuide/Master/Table/API/Programming-Go-Native-API.md index 8d7fb288d..1b33ff1c1 100644 --- a/src/zh/UserGuide/Master/Table/API/Programming-Go-Native-API.md +++ b/src/zh/UserGuide/Master/Table/API/Programming-Go-Native-API.md @@ -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) @@ -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) } @@ -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() @@ -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() @@ -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() diff --git a/src/zh/UserGuide/Master/Table/API/Programming-JDBC_apache.md b/src/zh/UserGuide/Master/Table/API/Programming-JDBC_apache.md index d027563f6..740a1d31d 100644 --- a/src/zh/UserGuide/Master/Table/API/Programming-JDBC_apache.md +++ b/src/zh/UserGuide/Master/Table/API/Programming-JDBC_apache.md @@ -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")) { diff --git a/src/zh/UserGuide/Master/Table/API/Programming-JDBC_timecho.md b/src/zh/UserGuide/Master/Table/API/Programming-JDBC_timecho.md index 0bd6d368b..18a767829 100644 --- a/src/zh/UserGuide/Master/Table/API/Programming-JDBC_timecho.md +++ b/src/zh/UserGuide/Master/Table/API/Programming-JDBC_timecho.md @@ -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")) { diff --git a/src/zh/UserGuide/Master/Table/API/Programming-Java-Native-API_apache.md b/src/zh/UserGuide/Master/Table/API/Programming-Java-Native-API_apache.md index c862b6a11..378a22eee 100644 --- a/src/zh/UserGuide/Master/Table/API/Programming-Java-Native-API_apache.md +++ b/src/zh/UserGuide/Master/Table/API/Programming-Java-Native-API_apache.md @@ -698,20 +698,20 @@ public class TableModelSessionPoolExample { // or use full qualified table name session.executeNonQueryStatement( "create table test1.table1(" - + "region_id STRING ID, " - + "plant_id STRING ID, " - + "device_id STRING ID, " + + "region_id STRING TAG, " + + "plant_id STRING TAG, " + + "device_id STRING TAG, " + "model STRING ATTRIBUTE, " - + "temperature FLOAT MEASUREMENT, " - + "humidity DOUBLE MEASUREMENT) with (TTL=3600000)"); + + "temperature FLOAT FIELD, " + + "humidity DOUBLE FIELD) with (TTL=3600000)"); session.executeNonQueryStatement( "create table table2(" - + "region_id STRING ID, " - + "plant_id STRING ID, " + + "region_id STRING TAG, " + + "plant_id STRING TAG, " + "color STRING ATTRIBUTE, " - + "temperature FLOAT MEASUREMENT, " - + "speed DOUBLE MEASUREMENT) with (TTL=6600000)"); + + "temperature FLOAT FIELD, " + + "speed DOUBLE FIELD) with (TTL=6600000)"); // show tables from current database try (SessionDataSet dataSet = session.executeQueryStatement("SHOW TABLES")) { @@ -745,12 +745,12 @@ public class TableModelSessionPoolExample { List columnTypeList = new ArrayList<>( Arrays.asList( - ColumnCategory.ID, - ColumnCategory.ID, - ColumnCategory.ID, + ColumnCategory.TAG, + ColumnCategory.TAG, + ColumnCategory.TAG, ColumnCategory.ATTRIBUTE, - ColumnCategory.MEASUREMENT, - ColumnCategory.MEASUREMENT)); + ColumnCategory.FIELD, + ColumnCategory.FIELD)); Tablet tablet = new Tablet( "test1", diff --git a/src/zh/UserGuide/Master/Table/API/Programming-Java-Native-API_timecho.md b/src/zh/UserGuide/Master/Table/API/Programming-Java-Native-API_timecho.md index 4fa04721a..b031e2e88 100644 --- a/src/zh/UserGuide/Master/Table/API/Programming-Java-Native-API_timecho.md +++ b/src/zh/UserGuide/Master/Table/API/Programming-Java-Native-API_timecho.md @@ -698,20 +698,20 @@ public class TableModelSessionPoolExample { // or use full qualified table name session.executeNonQueryStatement( "create table test1.table1(" - + "region_id STRING ID, " - + "plant_id STRING ID, " - + "device_id STRING ID, " + + "region_id STRING TAG, " + + "plant_id STRING TAG, " + + "device_id STRING TAG, " + "model STRING ATTRIBUTE, " - + "temperature FLOAT MEASUREMENT, " - + "humidity DOUBLE MEASUREMENT) with (TTL=3600000)"); + + "temperature FLOAT FIELD, " + + "humidity DOUBLE FIELD) with (TTL=3600000)"); session.executeNonQueryStatement( "create table table2(" - + "region_id STRING ID, " - + "plant_id STRING ID, " + + "region_id STRING TAG, " + + "plant_id STRING TAG, " + "color STRING ATTRIBUTE, " - + "temperature FLOAT MEASUREMENT, " - + "speed DOUBLE MEASUREMENT) with (TTL=6600000)"); + + "temperature FLOAT FIELD, " + + "speed DOUBLE FIELD) with (TTL=6600000)"); // show tables from current database try (SessionDataSet dataSet = session.executeQueryStatement("SHOW TABLES")) { @@ -745,12 +745,12 @@ public class TableModelSessionPoolExample { List columnTypeList = new ArrayList<>( Arrays.asList( - ColumnCategory.ID, - ColumnCategory.ID, - ColumnCategory.ID, + ColumnCategory.TAG, + ColumnCategory.TAG, + ColumnCategory.TAG, ColumnCategory.ATTRIBUTE, - ColumnCategory.MEASUREMENT, - ColumnCategory.MEASUREMENT)); + ColumnCategory.FIELD, + ColumnCategory.FIELD)); Tablet tablet = new Tablet( "test1", diff --git a/src/zh/UserGuide/Master/Table/API/Programming-Python-Native-API.md b/src/zh/UserGuide/Master/Table/API/Programming-Python-Native-API.md index 8608143f4..63953b310 100644 --- a/src/zh/UserGuide/Master/Table/API/Programming-Python-Native-API.md +++ b/src/zh/UserGuide/Master/Table/API/Programming-Python-Native-API.md @@ -25,7 +25,7 @@ 安装依赖包: -```Java +```shell pip3 install apache-iotdb>=2.0 ``` @@ -51,7 +51,7 @@ TableSession是IoTDB的一个核心类,用于与IoTDB数据库进行交互。 **TableSession:** -```Java +```Python class TableSession(object): def insert(self, tablet: Union[Tablet, NumpyTablet]): """ @@ -126,7 +126,7 @@ TableSessionConfig是一个配置类,用于设置和创建TableSession 实例 #### 2.2.3 接口展示 -```Java +```Python class TableSessionConfig(object): """ Configuration class for a TableSession. @@ -187,7 +187,7 @@ TableSessionPool 是一个会话池管理类,用于管理 TableSession 实例 **TableSessionPool:** -```Java +```Python def get_session(self) -> TableSession: """ Retrieve a new TableSession instance. @@ -238,7 +238,7 @@ TableSessionPoolConfig是一个配置类,用于设置和创建 TableSessionPoo #### 3.2.3 接口展示 -```Java +```Python class TableSessionPoolConfig(object): """ Configuration class for a TableSessionPool. @@ -292,7 +292,7 @@ class TableSessionPoolConfig(object): `conf/iotdb-system.properties` 配置文件中查找或添加以下配置项: -```Java +``` enable_thrift_ssl=true key_store_path=/path/to/your/server_keystore.jks key_store_pwd=your_keystore_password @@ -303,13 +303,13 @@ key_store_pwd=your_keystore_password - 设置 use_ssl 为 True 以启用 SSL。 - 指定客户端证书路径,使用 ca_certs 参数。 -```Java +``` use_ssl = True ca_certs = "/path/to/your/server.crt" # 或 ca_certs = "/path/to/your//ca_cert.pem" ``` **示例代码:使用 SSL 连接 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 @@ -386,7 +386,7 @@ Session示例代码:[Session Example](https://github.com/apache/iotdb/blob/rc/2. SessionPool示例代码:[SessionPool Example](https://github.com/apache/iotdb/blob/rc/2.0.1/iotdb-client/client-py/table_model_session_pool_example.py) -```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 @@ -421,14 +421,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:") @@ -454,7 +454,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): diff --git a/src/zh/UserGuide/latest-Table/API/Programming-Go-Native-API.md b/src/zh/UserGuide/latest-Table/API/Programming-Go-Native-API.md index 8d7fb288d..1b33ff1c1 100644 --- a/src/zh/UserGuide/latest-Table/API/Programming-Go-Native-API.md +++ b/src/zh/UserGuide/latest-Table/API/Programming-Go-Native-API.md @@ -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) @@ -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) } @@ -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() @@ -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() @@ -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() diff --git a/src/zh/UserGuide/latest-Table/API/Programming-JDBC_apache.md b/src/zh/UserGuide/latest-Table/API/Programming-JDBC_apache.md index d6054636f..96c2bb623 100644 --- a/src/zh/UserGuide/latest-Table/API/Programming-JDBC_apache.md +++ b/src/zh/UserGuide/latest-Table/API/Programming-JDBC_apache.md @@ -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")) { diff --git a/src/zh/UserGuide/latest-Table/API/Programming-JDBC_timecho.md b/src/zh/UserGuide/latest-Table/API/Programming-JDBC_timecho.md index 325ee394a..0fd3d1840 100644 --- a/src/zh/UserGuide/latest-Table/API/Programming-JDBC_timecho.md +++ b/src/zh/UserGuide/latest-Table/API/Programming-JDBC_timecho.md @@ -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")) { diff --git a/src/zh/UserGuide/latest-Table/API/Programming-Java-Native-API_apache.md b/src/zh/UserGuide/latest-Table/API/Programming-Java-Native-API_apache.md index e86227515..8c1b8d28e 100644 --- a/src/zh/UserGuide/latest-Table/API/Programming-Java-Native-API_apache.md +++ b/src/zh/UserGuide/latest-Table/API/Programming-Java-Native-API_apache.md @@ -698,20 +698,20 @@ public class TableModelSessionPoolExample { // or use full qualified table name session.executeNonQueryStatement( "create table test1.table1(" - + "region_id STRING ID, " - + "plant_id STRING ID, " - + "device_id STRING ID, " + + "region_id STRING TAG, " + + "plant_id STRING TAG, " + + "device_id STRING TAG, " + "model STRING ATTRIBUTE, " - + "temperature FLOAT MEASUREMENT, " - + "humidity DOUBLE MEASUREMENT) with (TTL=3600000)"); + + "temperature FLOAT FIELD, " + + "humidity DOUBLE FIELD) with (TTL=3600000)"); session.executeNonQueryStatement( "create table table2(" - + "region_id STRING ID, " - + "plant_id STRING ID, " + + "region_id STRING TAG, " + + "plant_id STRING TAG, " + "color STRING ATTRIBUTE, " - + "temperature FLOAT MEASUREMENT, " - + "speed DOUBLE MEASUREMENT) with (TTL=6600000)"); + + "temperature FLOAT FIELD, " + + "speed DOUBLE FIELD) with (TTL=6600000)"); // show tables from current database try (SessionDataSet dataSet = session.executeQueryStatement("SHOW TABLES")) { @@ -745,12 +745,12 @@ public class TableModelSessionPoolExample { List columnTypeList = new ArrayList<>( Arrays.asList( - ColumnCategory.ID, - ColumnCategory.ID, - ColumnCategory.ID, + ColumnCategory.TAG, + ColumnCategory.TAG, + ColumnCategory.TAG, ColumnCategory.ATTRIBUTE, - ColumnCategory.MEASUREMENT, - ColumnCategory.MEASUREMENT)); + ColumnCategory.FIELD, + ColumnCategory.FIELD)); Tablet tablet = new Tablet( "test1", diff --git a/src/zh/UserGuide/latest-Table/API/Programming-Java-Native-API_timecho.md b/src/zh/UserGuide/latest-Table/API/Programming-Java-Native-API_timecho.md index 516b9ed9c..936a5bada 100644 --- a/src/zh/UserGuide/latest-Table/API/Programming-Java-Native-API_timecho.md +++ b/src/zh/UserGuide/latest-Table/API/Programming-Java-Native-API_timecho.md @@ -698,20 +698,20 @@ public class TableModelSessionPoolExample { // or use full qualified table name session.executeNonQueryStatement( "create table test1.table1(" - + "region_id STRING ID, " - + "plant_id STRING ID, " - + "device_id STRING ID, " + + "region_id STRING TAG, " + + "plant_id STRING TAG, " + + "device_id STRING TAG, " + "model STRING ATTRIBUTE, " - + "temperature FLOAT MEASUREMENT, " - + "humidity DOUBLE MEASUREMENT) with (TTL=3600000)"); + + "temperature FLOAT FIELD, " + + "humidity DOUBLE FIELD) with (TTL=3600000)"); session.executeNonQueryStatement( "create table table2(" - + "region_id STRING ID, " - + "plant_id STRING ID, " + + "region_id STRING TAG, " + + "plant_id STRING TAG, " + "color STRING ATTRIBUTE, " - + "temperature FLOAT MEASUREMENT, " - + "speed DOUBLE MEASUREMENT) with (TTL=6600000)"); + + "temperature FLOAT FIELD, " + + "speed DOUBLE FIELD) with (TTL=6600000)"); // show tables from current database try (SessionDataSet dataSet = session.executeQueryStatement("SHOW TABLES")) { @@ -745,12 +745,12 @@ public class TableModelSessionPoolExample { List columnTypeList = new ArrayList<>( Arrays.asList( - ColumnCategory.ID, - ColumnCategory.ID, - ColumnCategory.ID, + ColumnCategory.TAG, + ColumnCategory.TAG, + ColumnCategory.TAG, ColumnCategory.ATTRIBUTE, - ColumnCategory.MEASUREMENT, - ColumnCategory.MEASUREMENT)); + ColumnCategory.FIELD, + ColumnCategory.FIELD)); Tablet tablet = new Tablet( "test1", diff --git a/src/zh/UserGuide/latest-Table/API/Programming-Python-Native-API.md b/src/zh/UserGuide/latest-Table/API/Programming-Python-Native-API.md index 8608143f4..63953b310 100644 --- a/src/zh/UserGuide/latest-Table/API/Programming-Python-Native-API.md +++ b/src/zh/UserGuide/latest-Table/API/Programming-Python-Native-API.md @@ -25,7 +25,7 @@ 安装依赖包: -```Java +```shell pip3 install apache-iotdb>=2.0 ``` @@ -51,7 +51,7 @@ TableSession是IoTDB的一个核心类,用于与IoTDB数据库进行交互。 **TableSession:** -```Java +```Python class TableSession(object): def insert(self, tablet: Union[Tablet, NumpyTablet]): """ @@ -126,7 +126,7 @@ TableSessionConfig是一个配置类,用于设置和创建TableSession 实例 #### 2.2.3 接口展示 -```Java +```Python class TableSessionConfig(object): """ Configuration class for a TableSession. @@ -187,7 +187,7 @@ TableSessionPool 是一个会话池管理类,用于管理 TableSession 实例 **TableSessionPool:** -```Java +```Python def get_session(self) -> TableSession: """ Retrieve a new TableSession instance. @@ -238,7 +238,7 @@ TableSessionPoolConfig是一个配置类,用于设置和创建 TableSessionPoo #### 3.2.3 接口展示 -```Java +```Python class TableSessionPoolConfig(object): """ Configuration class for a TableSessionPool. @@ -292,7 +292,7 @@ class TableSessionPoolConfig(object): `conf/iotdb-system.properties` 配置文件中查找或添加以下配置项: -```Java +``` enable_thrift_ssl=true key_store_path=/path/to/your/server_keystore.jks key_store_pwd=your_keystore_password @@ -303,13 +303,13 @@ key_store_pwd=your_keystore_password - 设置 use_ssl 为 True 以启用 SSL。 - 指定客户端证书路径,使用 ca_certs 参数。 -```Java +``` use_ssl = True ca_certs = "/path/to/your/server.crt" # 或 ca_certs = "/path/to/your//ca_cert.pem" ``` **示例代码:使用 SSL 连接 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 @@ -386,7 +386,7 @@ Session示例代码:[Session Example](https://github.com/apache/iotdb/blob/rc/2. SessionPool示例代码:[SessionPool Example](https://github.com/apache/iotdb/blob/rc/2.0.1/iotdb-client/client-py/table_model_session_pool_example.py) -```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 @@ -421,14 +421,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:") @@ -454,7 +454,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):