Skip to content

Commit

Permalink
fix(ui): bugfix for docs
Browse files Browse the repository at this point in the history
Signed-off-by: Jianxiang Ran <rxan_embedded@163.com>
  • Loading branch information
superrxan authored and ngjaying committed Jul 28, 2022
1 parent 27fe029 commit 1cc4b5b
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion docs/en_US/rules/sinks/plugin/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ for example, if he only wants mysql, then he can build with build tag `mysql`.
|----------------|----------|---------------------------------------------------------------------------------------------------------------------------------------------------------------|
| url | false | The url of the target database |
| table | false | The table name of the result |
| fields | false | The fields to be inserted to. The result map and the database should both have these fields. If not specified, all fields in the result map will be inserted. |
| fields | true | The fields to be inserted to. The result map and the database should both have these fields. If not specified, all fields in the result map will be inserted. |
| tableDataField | true | Write the nested values of the tableDataField into database. |

## Sample usage
Expand Down
10 changes: 5 additions & 5 deletions docs/en_US/rules/sinks/plugin/tdengine.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ As the tdengine database requires a timestamp field in the table, the user must
| table | string | false | Table Name, could be a [dynamic property](../../overview.md#dynamic-properties). |
| fields | []string | true | The fields to be inserted to. The result map and the database should both have these fields. If not specified, all fields in the result map will be inserted. |
| provideTs | Bool | true | Whether the user provides a timestamp field, default to false. |
| tsFieldName | String | true | Timestamp field name |
| tsFieldName | String | false | Timestamp field name |
| tagFields | []String | true | The result fields to be used as the tag values in order. If sTable is specified, this is required. |
| sTable | String | true | The super table to be use, could be a [dynamic property](../../overview.md#dynamic-properties). |
| tableDataField | String | true | Write the nested values of the tableDataField into database. |
Expand Down Expand Up @@ -74,9 +74,9 @@ Write into dynamic table:
"database": "dab",
"table": "{{.table}}", // dynamic value, get from the table field of the result
"tsfieldname": "ts",
"fields": []string{"f1", "f2"}, // Write f1, f2 fields in result into f1, f2 columns in the db
"fields": ["f1", "f2"], // Write f1, f2 fields in result into f1, f2 columns in the db
"sTable": "myStable", // super table name, also allow dynamic
"tagFields": []string{"f3","f4"} // Write f3, f4 fields' values in the result as tags in order
"tagFields": ["f3","f4"] // Write f3, f4 fields' values in the result as tags in order
}
}
```
Expand Down Expand Up @@ -112,10 +112,10 @@ The following configuration will write telemetry field's values into database
"database": "dab",
"table": "tableName", // dynamic value, get from the table field of the result
"tsfieldname": "ts",
"fields": []string{"temperature", "humidity"}, // Write f1, f2 fields in result into f1, f2 columns in the db
"fields": ["temperature","humidity"], // Write f1, f2 fields in result into f1, f2 columns in the db
"sTable": "myStable", // super table name, also allow dynamic
"tableDataField": "telemetry", // write values of telemetry field into database
"tagFields": []string{"f3","f4"} // Write f3, f4 fields' values in the result as tags in order
"tagFields": ["f3","f4"] // Write f3, f4 fields' values in the result as tags in order
}
}
```
4 changes: 2 additions & 2 deletions docs/zh_CN/rules/sinks/plugin/sql.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@
|----------------|----------|---------------------------------------------|
| url | false | 目标数据库的url |
| table | false | 结果的表名 |
| fields | false | 要插入的字段。结果映射和数据库都应该有这些字段。如果未指定,将插入结果映射中的所有字段 |
| tableDataField | false | 将 tableDataField 的嵌套值写入数据库。 |
| fields | true | 要插入的字段。结果映射和数据库都应该有这些字段。如果未指定,将插入结果映射中的所有字段 |
| tableDataField | true | 将 tableDataField 的嵌套值写入数据库。 |

## 使用样例

Expand Down
4 changes: 2 additions & 2 deletions etc/sinks/sql.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
}, {
"name": "tableDataField",
"default": "",
"optional": false,
"optional": true,
"control": "text",
"type": "string",
"hint": {
Expand All @@ -63,7 +63,7 @@
}, {
"name": "fields",
"default": [],
"optional": false,
"optional": true,
"control": "list",
"type": "list_string",
"hint": {
Expand Down
10 changes: 5 additions & 5 deletions etc/sinks/tdengine.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
},
{
"name": "port",
"default": 0,
"default": 6030,
"optional": false,
"control": "text",
"type": "int",
Expand Down Expand Up @@ -112,7 +112,7 @@
{
"name": "fields",
"default": [],
"optional": false,
"optional": true,
"control": "list",
"type": "list_string",
"hint": {
Expand Down Expand Up @@ -157,7 +157,7 @@
{
"name": "sTable",
"default": "",
"optional": false,
"optional": true,
"control": "text",
"type": "string",
"hint": {
Expand All @@ -172,7 +172,7 @@
{
"name": "tableDataField",
"default": "",
"optional": false,
"optional": true,
"control": "text",
"type": "string",
"hint": {
Expand All @@ -187,7 +187,7 @@
{
"name": "tagFields",
"default": [],
"optional": false,
"optional": true,
"control": "list",
"type": "list_string",
"hint": {
Expand Down

0 comments on commit 1cc4b5b

Please sign in to comment.