Skip to content

Commit c69e4fe

Browse files
committed
add import command to table ainode
1 parent 1a24c74 commit c69e4fe

8 files changed

Lines changed: 74 additions & 34 deletions

File tree

src/UserGuide/Master/Table/AI-capability/AINode_Upgrade_apache.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,13 @@ CREATE DATABASE etth;
117117
CREATE TABLE eg (hufl FLOAT FIELD, hull FLOAT FIELD, mufl FLOAT FIELD, mull FLOAT FIELD, lufl FLOAT FIELD, lull FLOAT FIELD, ot FLOAT FIELD)
118118
```
119119

120-
Prepare source data [ETTh1-tab](/img/ETTh1-tab.csv)
120+
Prepare source data [ETTh1-tab](/img/ETTh1-tab.csv).
121+
122+
You can import the raw data using the [import-data](../Tools-System/Data-Import-Tool_apache.md#_2-2-csv-format) script. For example:
123+
124+
```bash
125+
./tools/import-data.sh -ft csv -sql_dialect table -db etth -table eg -s ~/Desktop/model-compare-html/ETTh1-tab.csv
126+
```
121127

122128
Forecast 96 future values of sensor `ot` using its latest 96 historical records:
123129

src/UserGuide/Master/Table/AI-capability/AINode_Upgrade_timecho.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -92,19 +92,19 @@ SELECT * FROM FORECAST(
9292
* Built-in model inference does not require a registration process. By using the forecast function and specifying model_id, you can use the inference function of the model.
9393
* Parameter description
9494

95-
| Parameter Name | Parameter Type | Parameter Attributes | Description | Required | Notes |
96-
|----------------|----------------|----------------------|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|----------|-------|
97-
| model_id | Scalar parameter | String type | Unique identifier of the prediction model | Yes | |
98-
| targets | Table parameter | SET SEMANTIC | Input data for the target variables to be predicted. IoTDB will automatically sort the data in ascending order of time before passing it to AINode. | Yes | Use SQL to describe the input data with target variables. If the input SQL is invalid, corresponding query errors will be reported. |
95+
| Parameter Name | Parameter Type | Parameter Attributes | Description | Required | Notes |
96+
|----------------|----------------|----------------------|-------------|----------|-------|
97+
| model_id | Scalar parameter | String type | Unique identifier of the prediction model | Yes | |
98+
| targets | Table parameter | SET SEMANTIC | Input data for the target variables to be predicted. IoTDB will automatically sort the data in ascending order of time before passing it to AINode. | Yes | Use SQL to describe the input data with target variables. If the input SQL is invalid, corresponding query errors will be reported. |
9999
| history_covs | Scalar parameter | String type (valid table model query SQL), default: none | Specifies historical data of covariates for this prediction task, which are used to assist in predicting target variables. AINode will not output prediction results for historical covariates. Before passing data to the model, AINode will automatically sort the data in ascending order of time. | No | 1. Query results can only contain FIELD columns; 2. Other: Different models may have specific requirements, and errors will be thrown if not met. |
100-
| future_covs | Scalar parameter | String type (valid table model query SQL), default: none | Specifies future data of some covariates for this prediction task, which are used to assist in predicting target variables. Before passing data to the model, AINode will automatically sort the data in ascending order of time. | No | 1. Can only be specified when history_covs is set; 2. The covariate names involved must be a subset of history_covs; 3. Query results can only contain FIELD columns; 4. Other: Different models may have specific requirements, and errors will be thrown if not met. |
101-
| auto_adapt | Scalar parameter | Boolean type, default value: true | Whether to enable adaptive processing for covariate inference.(Support from V2.0.8.2) | No | When adaptive mode is enabled: 1. If the set of future covariates (`future_covs`) is not a subset of the historical covariates (`history_covs`), any future covariates not present in the historical set will be automatically discarded. 2. If the length of any historical covariate does not match the length of the input target variable: a. If shorter, pad zeros at the beginning; b. If longer, discard the earliest data points. 3. If the length of any future covariate does not match the prediction length (`output_length`): a. If shorter, pad zeros at the end; b. If longer, discard the most recent data points. |
102-
| output_start_time | Scalar parameter | Timestamp type. Default value: last timestamp of target variable + output_interval | Starting timestamp of output prediction points [i.e., forecast start time] | No | Must be greater than the maximum timestamp of target variable timestamps |
103-
| output_length | Scalar parameter | INT32 type. Default value: 96 | Output window size | No | Must be greater than 0 |
104-
| output_interval | Scalar parameter | Time interval type. Default value: (last timestamp - first timestamp of input data) / n - 1 | Time interval between output prediction points. Supported units: ns, us, ms, s, m, h, d, w | No | Must be greater than 0 |
105-
| timecol | Scalar parameter | String type. Default value: time | Name of time column | No | Must be a TIMESTAMP column existing in targets |
106-
| preserve_input | Scalar parameter | Boolean type. Default value: false | Whether to retain all original rows of target variable input in the output result set | No | |
107-
| model_options | Scalar parameter | String type. Default value: empty string | Key-value pairs related to the model, such as whether to normalize the input. Different key-value pairs are separated by ';'. | No | |
100+
| future_covs | Scalar parameter | String type (valid table model query SQL), default: none | Specifies future data of some covariates for this prediction task, which are used to assist in predicting target variables. Before passing data to the model, AINode will automatically sort the data in ascending order of time. | No | 1. Can only be specified when history_covs is set; 2. The covariate names involved must be a subset of history_covs; 3. Query results can only contain FIELD columns; 4. Other: Different models may have specific requirements, and errors will be thrown if not met. |
101+
| auto_adapt | Scalar parameter | Boolean type, default value: true | Whether to enable adaptive processing for covariate inference.(Support from V2.0.8.2) | No | When adaptive mode is enabled: 1. If the set of future covariates (`future_covs`) is not a subset of the historical covariates (`history_covs`), any future covariates not present in the historical set will be automatically discarded. 2. If the length of any historical covariate does not match the length of the input target variable: a. If shorter, pad zeros at the beginning; b. If longer, discard the earliest data points. 3. If the length of any future covariate does not match the prediction length (`output_length`): a. If shorter, pad zeros at the end; b. If longer, discard the most recent data points. |
102+
| output_start_time | Scalar parameter | Timestamp type. Default value: last timestamp of target variable + output_interval | Starting timestamp of output prediction points [i.e., forecast start time] | No | Must be greater than the maximum timestamp of target variable timestamps |
103+
| output_length | Scalar parameter | INT32 type. Default value: 96 | Output window size | No | Must be greater than 0 |
104+
| output_interval | Scalar parameter | Time interval type. Default value: (last timestamp - first timestamp of input data) / n - 1 | Time interval between output prediction points. Supported units: ns, us, ms, s, m, h, d, w | No | Must be greater than 0 |
105+
| timecol | Scalar parameter | String type. Default value: time | Name of time column | No | Must be a TIMESTAMP column existing in targets |
106+
| preserve_input | Scalar parameter | Boolean type. Default value: false | Whether to retain all original rows of target variable input in the output result set | No | |
107+
| model_options | Scalar parameter | String type. Default value: empty string | Key-value pairs related to the model, such as whether to normalize the input. Different key-value pairs are separated by ';'. | No | |
108108

109109
Notes:
110110
* **Default behavior**: Predict all columns of targets. Currently, only supports INT32, INT64, FLOAT, DOUBLE types.
@@ -130,7 +130,13 @@ create database etth;
130130
create table eg (hufl FLOAT FIELD, hull FLOAT FIELD, mufl FLOAT FIELD, mull FLOAT FIELD, lufl FLOAT FIELD, lull FLOAT FIELD, ot FLOAT FIELD)
131131
```
132132

133-
Prepare original data [ETTh1-tab](/img/ETTh1-tab.csv)
133+
Prepare original data [ETTh1-tab](/img/ETTh1-tab.csv).
134+
135+
You can import the raw data using the [import-data](../Tools-System/Data-Import-Tool_timecho.md#_2-2-csv-format) script. For example:
136+
137+
```bash
138+
./tools/import-data.sh -ft csv -sql_dialect table -db etth -table eg -s ~/Desktop/model-compare-html/ETTh1-tab.csv
139+
```
134140

135141
Use the first 96 rows of data from column ot in table eg to predict its future 96 rows of data.
136142

src/UserGuide/latest-Table/AI-capability/AINode_Upgrade_apache.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,13 @@ CREATE DATABASE etth;
117117
CREATE TABLE eg (hufl FLOAT FIELD, hull FLOAT FIELD, mufl FLOAT FIELD, mull FLOAT FIELD, lufl FLOAT FIELD, lull FLOAT FIELD, ot FLOAT FIELD)
118118
```
119119

120-
Prepare source data [ETTh1-tab](/img/ETTh1-tab.csv)
120+
Prepare source data [ETTh1-tab](/img/ETTh1-tab.csv).
121+
122+
You can import the raw data using the [import-data](../Tools-System/Data-Import-Tool_apache.md#_2-2-csv-format) script. For example:
123+
124+
```bash
125+
./tools/import-data.sh -ft csv -sql_dialect table -db etth -table eg -s ~/Desktop/model-compare-html/ETTh1-tab.csv
126+
```
121127

122128
Forecast 96 future values of sensor `ot` using its latest 96 historical records:
123129

src/UserGuide/latest-Table/AI-capability/AINode_Upgrade_timecho.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,13 @@ create database etth;
130130
create table eg (hufl FLOAT FIELD, hull FLOAT FIELD, mufl FLOAT FIELD, mull FLOAT FIELD, lufl FLOAT FIELD, lull FLOAT FIELD, ot FLOAT FIELD)
131131
```
132132

133-
Prepare original data [ETTh1-tab](/img/ETTh1-tab.csv)
133+
Prepare original data [ETTh1-tab](/img/ETTh1-tab.csv).
134+
135+
You can import the raw data using the [import-data](../Tools-System/Data-Import-Tool_timecho.md#_2-2-csv-format) script. For example:
136+
137+
```bash
138+
./tools/import-data.sh -ft csv -sql_dialect table -db etth -table eg -s ~/Desktop/model-compare-html/ETTh1-tab.csv
139+
```
134140

135141
Use the first 96 rows of data from column ot in table eg to predict its future 96 rows of data.
136142

src/zh/UserGuide/Master/Table/AI-capability/AINode_Upgrade_apache.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@ create database etth;
118118
create table eg (hufl FLOAT FIELD, hull FLOAT FIELD, mufl FLOAT FIELD, mull FLOAT FIELD, lufl FLOAT FIELD, lull FLOAT FIELD, ot FLOAT FIELD)
119119
```
120120

121-
准备原始数据 [ETTh1-tab](/img/ETTh1-tab.csv)
121+
准备原始数据 [ETTh1-tab](/img/ETTh1-tab.csv),可通过 [import-data](../Tools-System/Data-Import-Tool_apache.md#_2-2-csv-格式) 脚本导入原始数据,例如
122+
123+
```bash
124+
./tools/import-data.sh -ft csv -sql_dialect table -db etth -table eg -s ~/Desktop/model-compare-html/ETTh1-tab.csv
125+
```
122126

123127
使用表 eg 中测点 ot 已知的 96 行数据,预测其未来的 96 行数据.
124128

0 commit comments

Comments
 (0)