You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "liunaijie (via GitHub)" <gi...@apache.org> on 2023/08/30 07:04:36 UTC
[GitHub] [seatunnel] liunaijie opened a new pull request, #5404: [Doc] update iotdb document
liunaijie opened a new pull request, #5404:
URL: https://github.com/apache/seatunnel/pull/5404
<!--
Thank you for contributing to SeaTunnel! Please make sure that your code changes
are covered with tests. And in case of new features or big changes
remember to adjust the documentation.
Feel free to ping committers for the review!
## Contribution Checklist
- Make sure that the pull request corresponds to a [GITHUB issue](https://github.com/apache/seatunnel/issues).
- Name the pull request in the form "[Feature] [component] Title of the pull request", where *Feature* can be replaced by `Hotfix`, `Bug`, etc.
- Minor fixes should be named following this pattern: `[hotfix] [docs] Fix typo in README.md doc`.
-->
## Purpose of this pull request
close #5399
<!-- Describe the purpose of this pull request. For example: This pull request adds checkstyle plugin.-->
## Check list
* [ ] Code changed are covered with tests, or it does not need tests for reason:
* [ ] If any new Jar binary package adding in your PR, please add License Notice according
[New License Guide](https://github.com/apache/seatunnel/blob/dev/docs/en/contribution/new-license.md)
* [ ] If necessary, please update the documentation to describe the new feature. https://github.com/apache/seatunnel/tree/dev/docs
* [ ] If you are contributing the connector code, please check that the following files are updated:
1. Update change log that in connector document. For more details you can refer to [connector-v2](https://github.com/apache/seatunnel/tree/dev/docs/en/connector-v2)
2. Update [plugin-mapping.properties](https://github.com/apache/seatunnel/blob/dev/plugin-mapping.properties) and add new connector information in it
3. Update the pom file of [seatunnel-dist](https://github.com/apache/seatunnel/blob/dev/seatunnel-dist/pom.xml)
* [ ] Update the [`release-note`](https://github.com/apache/seatunnel/blob/dev/release-note.md).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] liunaijie commented on pull request #5404: [Doc] update iotdb document
Posted by "liunaijie (via GitHub)" <gi...@apache.org>.
liunaijie commented on PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#issuecomment-1700534886
@hailin0 when i update the doc, i find in source, node_url is required, and host, port is optional. but they all represent same thing.
I see you recommend set host,port in single node, but in this case node_url is still need to fill. is this duplicate? i want update the code, remove host,port option.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] ruanwenjun commented on pull request #5404: [Doc] update iotdb document
Posted by "ruanwenjun (via GitHub)" <gi...@apache.org>.
ruanwenjun commented on PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#issuecomment-1699108776
LGTM, it's better to use v2.0 doc style as @zhilinli123 said.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] zhilinli123 commented on a diff in pull request #5404: [Doc] update iotdb document
Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on code in PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#discussion_r1314643008
##########
docs/en/connector-v2/sink/IoTDB.md:
##########
@@ -68,78 +68,124 @@ There is a conflict of thrift version between IoTDB and Spark.Therefore, you nee
| connection_timeout_in_ms | Integer | No | - | The maximum time (in ms) to wait when connecting to `IoTDB` |
| common-options | | no | - | Sink plugin common parameters, please refer to [Sink Common Options](common-options.md) for details |
-## Task Example
+## Examples
+
+```hocon
+env {
+ execution.parallelism = 2
+ job.mode = "BATCH"
+}
+
+source {
+ FakeSource {
+ row.num = 16
+ bigint.template = [1664035200001]
+ schema = {
+ fields {
+ device_name = "string"
+ temperature = "float"
+ moisture = "int"
+ event_ts = "bigint"
+ c_string = "string"
+ c_boolean = "boolean"
+ c_tinyint = "tinyint"
+ c_smallint = "smallint"
+ c_int = "int"
+ c_bigint = "bigint"
+ c_float = "float"
+ c_double = "double"
+ }
+ }
+ }
+}
+
+...
+
+```
+
+Upstream SeaTunnelRow data format is the following:
+
+| device_name | temperature | moisture | event_ts | c_string | c_boolean | c_tinyint | c_smallint | c_int | c_bigint | c_float | c_double |
+|--------------------------|-------------|----------|---------------|----------|-----------|-----------|------------|-------|------------|---------|----------|
+| root.test_group.device_a | 36.1 | 100 | 1664035200001 | abc1 | true | 1 | 1 | 1 | 2147483648 | 1.0 | 1.0 |
+| root.test_group.device_b | 36.2 | 101 | 1664035200001 | abc2 | false | 2 | 2 | 2 | 2147483649 | 2.0 | 2.0 |
+| root.test_group.device_c | 36.3 | 102 | 1664035200001 | abc3 | false | 3 | 3 | 3 | 2147483649 | 3.0 | 3.0 |
### Case1
-Common options:
+only fill required config.
+use current processing time as timestamp. and include all fields but exclude `device` & `timestamp` as measurement fields
```hocon
sink {
IoTDB {
- node_urls = ["localhost:6667"]
+ node_urls = "localhost:6667"
username = "root"
password = "root"
- batch_size = 1024
+ key_device = "device_name"
}
}
```
-When you assign `key_device` is `device_name`, for example:
+Output to `IoTDB` data format is the following:
+
+```shell
+IoTDB> SELECT * FROM root.test_group.* align by device;
++------------------------+------------------------+--------------+-----------+--------------+---------+----------+----------+-----------+------+-----------+--------+---------+
+| Time| Device| temperature| moisture| event_ts| c_string| c_boolean| c_tinyint| c_smallint| c_int| c_bigint| c_float| c_double|
++------------------------+------------------------+--------------+-----------+--------------+---------+----------+----------+-----------+------+-----------+--------+---------+
+|2023-09-01T00:00:00.001Z|root.test_group.device_a| 36.1| 100| 1664035200001| abc1| true| 1| 1| 1| 2147483648| 1.0| 1.0|
+|2023-09-01T00:00:00.001Z|root.test_group.device_b| 36.2| 101| 1664035200001| abc2| false| 2| 2| 2| 2147483649| 2.0| 2.0|
+|2023-09-01T00:00:00.001Z|root.test_group.device_c| 36.3| 102| 1664035200001| abc2| false| 3| 3| 3| 2147483649| 3.0| 3.0|
++------------------------+------------------------+--------------+-----------+--------------+---------+---------+-----------+-----------+------+-----------+--------+---------+
+```
+
+### Case2
+
+use source event's time
```hocon
sink {
IoTDB {
- ...
+ node_urls = "localhost:6667"
+ username = "root"
+ password = "root"
key_device = "device_name"
+ key_timestamp = "event_ts"
Review Comment:
Add some description to this? What does the configuration need to pay attention to to tell us the user what it does?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] liunaijie commented on pull request #5404: [Doc] update iotdb document
Posted by "liunaijie (via GitHub)" <gi...@apache.org>.
liunaijie commented on PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#issuecomment-1702420839
> We hope that there should be more examples in the document to demonstrate the scenarios in which different parameters are used. In general, we recommend at least three examples.
updated
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] liunaijie commented on pull request #5404: [Doc] update iotdb document
Posted by "liunaijie (via GitHub)" <gi...@apache.org>.
liunaijie commented on PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#issuecomment-1698822071
sure
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] liunaijie commented on pull request #5404: [Doc] update iotdb document
Posted by "liunaijie (via GitHub)" <gi...@apache.org>.
liunaijie commented on PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#issuecomment-1698611232
@hailin0 PTAL
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] zhilinli123 commented on a diff in pull request #5404: [Doc] update iotdb document
Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on code in PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#discussion_r1314261919
##########
docs/en/connector-v2/sink/IoTDB.md:
##########
@@ -68,78 +68,118 @@ There is a conflict of thrift version between IoTDB and Spark.Therefore, you nee
| connection_timeout_in_ms | Integer | No | - | The maximum time (in ms) to wait when connecting to `IoTDB` |
| common-options | | no | - | Sink plugin common parameters, please refer to [Sink Common Options](common-options.md) for details |
-## Task Example
+## Examples
+
+```hocon
+env {
+ execution.parallelism = 2
+ job.mode = "BATCH"
+}
+
+source {
+ FakeSource {
+ row.num = 16
+ bigint.template = [1664035200001]
+ schema = {
+ fields {
+ device_name = "string"
+ temperature = "float"
+ moisture = "int"
+ event_ts = "bigint"
+ field_1 = "string"
+ field_2 = "string"
Review Comment:
add all type

--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] zhilinli123 commented on a diff in pull request #5404: [Doc] update iotdb document
Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on code in PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#discussion_r1314262011
##########
docs/en/connector-v2/source/IoTDB.md:
##########
@@ -157,37 +106,31 @@ Source plugin common parameters, please refer to [Source Common Options](common-
## Examples
-### Case1
-
-Common options:
-
```hocon
+env {
+ execution.parallelism = 2
+ job.mode = "BATCH"
+}
+
source {
IoTDB {
node_urls = "localhost:6667"
username = "root"
password = "root"
+ sql = "SELECT temperature, moisture FROM root.test_group.* WHERE time < 4102329600000 align by device"
+ schema {
+ fields {
+ ts = timestamp
+ device_name = string
+ temperature = float
+ moisture = bigint
Review Comment:

ditto
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] zhilinli123 commented on pull request #5404: [Doc] update iotdb document
Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#issuecomment-1698693631
Hi @liunaijie Would you like to contribute v2.0 documentation to the Iotdb connector? I look forward to your contribution
issues:https://github.com/apache/seatunnel/issues/4572
reference:https://github.com/apache/seatunnel/blob/dev/docs/en/connector-v2/source/Mysql.md
https://github.com/apache/seatunnel/blob/dev/docs/en/connector-v2/sink/Mysql.md
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] hailin0 commented on a diff in pull request #5404: [Doc] update iotdb document
Posted by "hailin0 (via GitHub)" <gi...@apache.org>.
hailin0 commented on code in PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#discussion_r1311018879
##########
docs/en/connector-v2/sink/IoTDB.md:
##########
@@ -68,77 +68,46 @@ There is a conflict of thrift version between IoTDB and Spark.Therefore, you nee
| connection_timeout_in_ms | Integer | No | - | The maximum time (in ms) to wait when connecting to `IoTDB` |
| common-options | | no | - | Sink plugin common parameters, please refer to [Sink Common Options](common-options.md) for details |
-## Task Example
-
-### Case1
-
-Common options:
+## Examples
```hocon
-sink {
- IoTDB {
- node_urls = ["localhost:6667"]
- username = "root"
- password = "root"
- batch_size = 1024
- }
+env {
+ execution.parallelism = 2
+ job.mode = "BATCH"
}
-```
-When you assign `key_device` is `device_name`, for example:
-
-```hocon
-sink {
- IoTDB {
- ...
- key_device = "device_name"
+source {
+ FakeSource {
+ row.num = 16
+ schema = {
+ fields {
+ device_name = "string"
+ temperature = "float"
+ moisture = "bigint"
+ }
+ }
}
}
-```
-Upstream SeaTunnelRow data format is the following:
Review Comment:
why delete?
##########
docs/en/connector-v2/sink/IoTDB.md:
##########
@@ -68,77 +68,46 @@ There is a conflict of thrift version between IoTDB and Spark.Therefore, you nee
| connection_timeout_in_ms | Integer | No | - | The maximum time (in ms) to wait when connecting to `IoTDB` |
| common-options | | no | - | Sink plugin common parameters, please refer to [Sink Common Options](common-options.md) for details |
-## Task Example
-
-### Case1
-
-Common options:
+## Examples
```hocon
-sink {
- IoTDB {
- node_urls = ["localhost:6667"]
- username = "root"
- password = "root"
- batch_size = 1024
- }
+env {
+ execution.parallelism = 2
+ job.mode = "BATCH"
}
-```
-When you assign `key_device` is `device_name`, for example:
-
-```hocon
-sink {
- IoTDB {
- ...
- key_device = "device_name"
+source {
+ FakeSource {
+ row.num = 16
+ schema = {
+ fields {
+ device_name = "string"
+ temperature = "float"
+ moisture = "bigint"
+ }
+ }
}
}
-```
-Upstream SeaTunnelRow data format is the following:
-
-| device_name | field_1 | field_2 |
-|--------------------------|---------|---------|
-| root.test_group.device_a | 1001 | 1002 |
-| root.test_group.device_b | 2001 | 2002 |
-| root.test_group.device_c | 3001 | 3002 |
-
-Output to `IoTDB` data format is the following:
-
-```shell
-IoTDB> SELECT * FROM root.test_group.* align by device;
-+------------------------+------------------------+-----------+----------+
-| Time| Device| field_1| field_2|
-+------------------------+------------------------+----------+-----------+
-|2022-09-26T17:50:01.201Z|root.test_group.device_a| 1001| 1002|
-|2022-09-26T17:50:01.202Z|root.test_group.device_b| 2001| 2002|
-|2022-09-26T17:50:01.203Z|root.test_group.device_c| 3001| 3002|
-+------------------------+------------------------+----------+-----------+
-```
-
-### Case2
-
-When you assign `key_device`、`key_timestamp`、`key_measurement_fields`, for example:
-
-```hocon
sink {
IoTDB {
- ...
+ node_urls = "localhost:6667"
+ username = "root"
+ password = "root"
key_device = "device_name"
- key_timestamp = "ts"
key_measurement_fields = ["temperature", "moisture"]
}
}
+
```
Upstream SeaTunnelRow data format is the following:
-| ts | device_name | field_1 | field_2 | temperature | moisture |
Review Comment:
whl update ?
##########
docs/en/connector-v2/sink/IoTDB.md:
##########
@@ -68,77 +68,46 @@ There is a conflict of thrift version between IoTDB and Spark.Therefore, you nee
| connection_timeout_in_ms | Integer | No | - | The maximum time (in ms) to wait when connecting to `IoTDB` |
| common-options | | no | - | Sink plugin common parameters, please refer to [Sink Common Options](common-options.md) for details |
-## Task Example
-
-### Case1
-
-Common options:
+## Examples
```hocon
-sink {
- IoTDB {
- node_urls = ["localhost:6667"]
- username = "root"
- password = "root"
- batch_size = 1024
- }
+env {
+ execution.parallelism = 2
+ job.mode = "BATCH"
}
-```
-When you assign `key_device` is `device_name`, for example:
-
-```hocon
-sink {
- IoTDB {
- ...
- key_device = "device_name"
+source {
+ FakeSource {
+ row.num = 16
+ schema = {
+ fields {
+ device_name = "string"
+ temperature = "float"
+ moisture = "bigint"
+ }
+ }
}
}
-```
-Upstream SeaTunnelRow data format is the following:
-
-| device_name | field_1 | field_2 |
-|--------------------------|---------|---------|
-| root.test_group.device_a | 1001 | 1002 |
-| root.test_group.device_b | 2001 | 2002 |
-| root.test_group.device_c | 3001 | 3002 |
-
-Output to `IoTDB` data format is the following:
-
-```shell
-IoTDB> SELECT * FROM root.test_group.* align by device;
-+------------------------+------------------------+-----------+----------+
-| Time| Device| field_1| field_2|
-+------------------------+------------------------+----------+-----------+
-|2022-09-26T17:50:01.201Z|root.test_group.device_a| 1001| 1002|
-|2022-09-26T17:50:01.202Z|root.test_group.device_b| 2001| 2002|
-|2022-09-26T17:50:01.203Z|root.test_group.device_c| 3001| 3002|
-+------------------------+------------------------+----------+-----------+
-```
-
-### Case2
-
-When you assign `key_device`、`key_timestamp`、`key_measurement_fields`, for example:
-
-```hocon
sink {
IoTDB {
- ...
+ node_urls = "localhost:6667"
+ username = "root"
+ password = "root"
key_device = "device_name"
- key_timestamp = "ts"
Review Comment:
why delete?
##########
docs/en/connector-v2/sink/IoTDB.md:
##########
@@ -68,77 +68,46 @@ There is a conflict of thrift version between IoTDB and Spark.Therefore, you nee
| connection_timeout_in_ms | Integer | No | - | The maximum time (in ms) to wait when connecting to `IoTDB` |
| common-options | | no | - | Sink plugin common parameters, please refer to [Sink Common Options](common-options.md) for details |
-## Task Example
-
-### Case1
-
-Common options:
+## Examples
```hocon
-sink {
- IoTDB {
- node_urls = ["localhost:6667"]
- username = "root"
- password = "root"
- batch_size = 1024
- }
+env {
+ execution.parallelism = 2
+ job.mode = "BATCH"
}
-```
-When you assign `key_device` is `device_name`, for example:
-
-```hocon
-sink {
- IoTDB {
- ...
- key_device = "device_name"
+source {
+ FakeSource {
+ row.num = 16
+ schema = {
+ fields {
+ device_name = "string"
+ temperature = "float"
+ moisture = "bigint"
+ }
+ }
}
}
-```
-Upstream SeaTunnelRow data format is the following:
-
-| device_name | field_1 | field_2 |
-|--------------------------|---------|---------|
-| root.test_group.device_a | 1001 | 1002 |
-| root.test_group.device_b | 2001 | 2002 |
-| root.test_group.device_c | 3001 | 3002 |
-
-Output to `IoTDB` data format is the following:
-
-```shell
-IoTDB> SELECT * FROM root.test_group.* align by device;
-+------------------------+------------------------+-----------+----------+
-| Time| Device| field_1| field_2|
-+------------------------+------------------------+----------+-----------+
-|2022-09-26T17:50:01.201Z|root.test_group.device_a| 1001| 1002|
-|2022-09-26T17:50:01.202Z|root.test_group.device_b| 2001| 2002|
-|2022-09-26T17:50:01.203Z|root.test_group.device_c| 3001| 3002|
-+------------------------+------------------------+----------+-----------+
-```
-
-### Case2
-
-When you assign `key_device`、`key_timestamp`、`key_measurement_fields`, for example:
-
-```hocon
sink {
IoTDB {
- ...
+ node_urls = "localhost:6667"
+ username = "root"
+ password = "root"
key_device = "device_name"
- key_timestamp = "ts"
key_measurement_fields = ["temperature", "moisture"]
}
}
+
```
Upstream SeaTunnelRow data format is the following:
-| ts | device_name | field_1 | field_2 | temperature | moisture |
Review Comment:
whl update ?
##########
docs/en/connector-v2/sink/IoTDB.md:
##########
@@ -68,77 +68,46 @@ There is a conflict of thrift version between IoTDB and Spark.Therefore, you nee
| connection_timeout_in_ms | Integer | No | - | The maximum time (in ms) to wait when connecting to `IoTDB` |
| common-options | | no | - | Sink plugin common parameters, please refer to [Sink Common Options](common-options.md) for details |
-## Task Example
-
-### Case1
-
-Common options:
+## Examples
```hocon
-sink {
- IoTDB {
- node_urls = ["localhost:6667"]
- username = "root"
- password = "root"
- batch_size = 1024
- }
+env {
+ execution.parallelism = 2
+ job.mode = "BATCH"
}
-```
-When you assign `key_device` is `device_name`, for example:
-
-```hocon
-sink {
- IoTDB {
- ...
- key_device = "device_name"
+source {
+ FakeSource {
+ row.num = 16
+ schema = {
+ fields {
+ device_name = "string"
+ temperature = "float"
+ moisture = "bigint"
+ }
+ }
}
}
-```
-Upstream SeaTunnelRow data format is the following:
-
-| device_name | field_1 | field_2 |
-|--------------------------|---------|---------|
-| root.test_group.device_a | 1001 | 1002 |
-| root.test_group.device_b | 2001 | 2002 |
-| root.test_group.device_c | 3001 | 3002 |
-
-Output to `IoTDB` data format is the following:
-
-```shell
-IoTDB> SELECT * FROM root.test_group.* align by device;
-+------------------------+------------------------+-----------+----------+
-| Time| Device| field_1| field_2|
-+------------------------+------------------------+----------+-----------+
-|2022-09-26T17:50:01.201Z|root.test_group.device_a| 1001| 1002|
-|2022-09-26T17:50:01.202Z|root.test_group.device_b| 2001| 2002|
-|2022-09-26T17:50:01.203Z|root.test_group.device_c| 3001| 3002|
-+------------------------+------------------------+----------+-----------+
-```
-
-### Case2
-
-When you assign `key_device`、`key_timestamp`、`key_measurement_fields`, for example:
-
-```hocon
sink {
IoTDB {
- ...
+ node_urls = "localhost:6667"
+ username = "root"
+ password = "root"
key_device = "device_name"
- key_timestamp = "ts"
Review Comment:
why delete?
##########
docs/en/connector-v2/sink/IoTDB.md:
##########
@@ -68,77 +68,46 @@ There is a conflict of thrift version between IoTDB and Spark.Therefore, you nee
| connection_timeout_in_ms | Integer | No | - | The maximum time (in ms) to wait when connecting to `IoTDB` |
| common-options | | no | - | Sink plugin common parameters, please refer to [Sink Common Options](common-options.md) for details |
-## Task Example
-
-### Case1
-
-Common options:
+## Examples
```hocon
-sink {
- IoTDB {
- node_urls = ["localhost:6667"]
- username = "root"
- password = "root"
- batch_size = 1024
- }
+env {
+ execution.parallelism = 2
+ job.mode = "BATCH"
}
-```
-When you assign `key_device` is `device_name`, for example:
-
-```hocon
-sink {
- IoTDB {
- ...
- key_device = "device_name"
+source {
+ FakeSource {
+ row.num = 16
+ schema = {
+ fields {
+ device_name = "string"
+ temperature = "float"
+ moisture = "bigint"
+ }
+ }
}
}
-```
-Upstream SeaTunnelRow data format is the following:
Review Comment:
why delete?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] zhilinli123 commented on a diff in pull request #5404: [Doc] update iotdb document
Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on code in PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#discussion_r1314640161
##########
docs/en/connector-v2/source/IoTDB.md:
##########
@@ -18,106 +20,53 @@ supports query SQL and can achieve projection effect.
- [x] [parallelism](../../concept/connector-v2-features.md)
- [ ] [support user-defined split](../../concept/connector-v2-features.md)
-## Options
-
-| name | type | required | default value |
-|----------------------------|---------|----------|---------------|
-| host | string | no | - |
-| port | int | no | - |
-| node_urls | string | no | - |
-| username | string | yes | - |
-| password | string | yes | - |
-| sql | string | yes | - |
-| schema | config | yes | - |
-| fetch_size | int | no | - |
-| lower_bound | long | no | - |
-| upper_bound | long | no | - |
-| num_partitions | int | no | - |
-| thrift_default_buffer_size | int | no | - |
-| enable_cache_leader | boolean | no | - |
-| version | string | no | - |
-| common-options | | no | - |
-
-### single node, you need to set host and port to connect to the remote data source.
-
-**host** [string] the host of the IoTDB when you select host of the IoTDB
-
-**port** [int] the port of the IoTDB when you select
-
-### multi node, you need to set node_urls to connect to the remote data source.
-
-**node_urls** [string] the node_urls of the IoTDB when you select
-
-e.g.
-
-```text
-127.0.0.1:8080,127.0.0.2:8080
-```
-
-### other parameters
-
-**sql** [string]
-execute sql statement e.g.
-
-```
-select name,age from test
-```
-
-### schema [config]
-
-#### fields [Config]
-
-The schema of the IoTDB that you want to generate
-
-e.g.
-
-```
-schema {
- fields {
- name = string
- age = int
- }
- }
-```
-
-### option parameters
-
-### fetch_size [int]
-
-the fetch_size of the IoTDB when you select
-
-### username [string]
-
-the username of the IoTDB when you select
-
-### password [string]
-
-the password of the IoTDB when you select
-
-### lower_bound [long]
-
-the lower_bound of the IoTDB when you select
-
-### upper_bound [long]
-
-the upper_bound of the IoTDB when you select
-
-### num_partitions [int]
-
-the num_partitions of the IoTDB when you select
-
-### thrift_default_buffer_size [int]
-
-the thrift_default_buffer_size of the IoTDB when you select
-
-### enable_cache_leader [boolean]
-
-enable_cache_leader of the IoTDB when you select
+## Description
-### version [string]
+Read external data source data through IoTDB.
-Version represents the SQL semantic version used by the client, which is used to be compatible with the SQL semantics of
-0.12 when upgrading 0.13. The possible values are: V_0_12, V_0_13.
+:::tip
+
+There is a conflict of thrift version between IoTDB and Spark.Therefore, you need to execute `rm -f $SPARK_HOME/jars/libthrift*` and `cp $IOTDB_HOME/lib/libthrift* $SPARK_HOME/jars/` to resolve it.
+
+:::
+
+## Supported DataSource Info
+
+| Datasource | Supported Versions | Url |
+|------------|--------------------|----------------|
+| IoTDB | `>= 0.13.0` | localhost:6667 |
+
+## Data Type Mapping
+
+| IotDB Data type | SeaTunnel Data type |
+|-----------------|---------------------|
+| BOOLEAN | BOOLEAN |
+| INT32 | TINYINT |
+| INT32 | SMALLINT |
+| INT32 | INT |
+| INT64 | BIGINT |
+| FLOAT | FLOAT |
+| DOUBLE | DOUBLE |
+| TEXT | STRING |
+
+## Source Options
+
+| name | type | required | default value | Description |
Review Comment:
| name | type | required | default value | Description |
| Name | Type | Required | Default Value | Description |
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] zhilinli123 commented on a diff in pull request #5404: [Doc] update iotdb document
Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on code in PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#discussion_r1314642506
##########
docs/en/connector-v2/sink/IoTDB.md:
##########
@@ -68,78 +68,124 @@ There is a conflict of thrift version between IoTDB and Spark.Therefore, you nee
| connection_timeout_in_ms | Integer | No | - | The maximum time (in ms) to wait when connecting to `IoTDB` |
| common-options | | no | - | Sink plugin common parameters, please refer to [Sink Common Options](common-options.md) for details |
-## Task Example
+## Examples
+
+```hocon
+env {
+ execution.parallelism = 2
+ job.mode = "BATCH"
+}
+
+source {
+ FakeSource {
+ row.num = 16
+ bigint.template = [1664035200001]
+ schema = {
+ fields {
+ device_name = "string"
+ temperature = "float"
+ moisture = "int"
+ event_ts = "bigint"
+ c_string = "string"
+ c_boolean = "boolean"
+ c_tinyint = "tinyint"
+ c_smallint = "smallint"
+ c_int = "int"
+ c_bigint = "bigint"
+ c_float = "float"
+ c_double = "double"
+ }
+ }
+ }
+}
+
+...
+
+```
+
+Upstream SeaTunnelRow data format is the following:
+
+| device_name | temperature | moisture | event_ts | c_string | c_boolean | c_tinyint | c_smallint | c_int | c_bigint | c_float | c_double |
+|--------------------------|-------------|----------|---------------|----------|-----------|-----------|------------|-------|------------|---------|----------|
+| root.test_group.device_a | 36.1 | 100 | 1664035200001 | abc1 | true | 1 | 1 | 1 | 2147483648 | 1.0 | 1.0 |
+| root.test_group.device_b | 36.2 | 101 | 1664035200001 | abc2 | false | 2 | 2 | 2 | 2147483649 | 2.0 | 2.0 |
+| root.test_group.device_c | 36.3 | 102 | 1664035200001 | abc3 | false | 3 | 3 | 3 | 2147483649 | 3.0 | 3.0 |
### Case1
-Common options:
+only fill required config.
+use current processing time as timestamp. and include all fields but exclude `device` & `timestamp` as measurement fields
```hocon
sink {
IoTDB {
- node_urls = ["localhost:6667"]
+ node_urls = "localhost:6667"
username = "root"
password = "root"
- batch_size = 1024
+ key_device = "device_name"
Review Comment:
Add some description to this? What does the configuration need to pay attention to to tell us the user what it does?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] liunaijie commented on a diff in pull request #5404: [Doc] update iotdb document
Posted by "liunaijie (via GitHub)" <gi...@apache.org>.
liunaijie commented on code in PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#discussion_r1311188685
##########
docs/en/connector-v2/sink/IoTDB.md:
##########
@@ -68,77 +68,46 @@ There is a conflict of thrift version between IoTDB and Spark.Therefore, you nee
| connection_timeout_in_ms | Integer | No | - | The maximum time (in ms) to wait when connecting to `IoTDB` |
| common-options | | no | - | Sink plugin common parameters, please refer to [Sink Common Options](common-options.md) for details |
-## Task Example
-
-### Case1
-
-Common options:
+## Examples
```hocon
-sink {
- IoTDB {
- node_urls = ["localhost:6667"]
- username = "root"
- password = "root"
- batch_size = 1024
- }
+env {
+ execution.parallelism = 2
+ job.mode = "BATCH"
}
-```
-When you assign `key_device` is `device_name`, for example:
-
-```hocon
-sink {
- IoTDB {
- ...
- key_device = "device_name"
+source {
+ FakeSource {
+ row.num = 16
+ schema = {
+ fields {
+ device_name = "string"
+ temperature = "float"
+ moisture = "bigint"
+ }
+ }
}
}
-```
-Upstream SeaTunnelRow data format is the following:
Review Comment:
the sink example, I only add 1 case (fakesource to iotdb)(also 1 case in source example, use iotdb to console)
the key_timestamp is optional, so i remove it.
for example data, remove some filed to keep consistent with example code.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] EricJoy2048 commented on pull request #5404: [Doc] update iotdb document
Posted by "EricJoy2048 (via GitHub)" <gi...@apache.org>.
EricJoy2048 commented on PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#issuecomment-1702286143
We hope that there should be more examples in the document to demonstrate the scenarios in which different parameters are used. In general, we recommend at least three examples.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] zhilinli123 commented on pull request #5404: [Doc] update iotdb document
Posted by "zhilinli123 (via GitHub)" <gi...@apache.org>.
zhilinli123 commented on PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404#issuecomment-1705907145
thanks contribution PTAL: @EricJoy2048
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [seatunnel] liugddx merged pull request #5404: [Doc] update iotdb document
Posted by "liugddx (via GitHub)" <gi...@apache.org>.
liugddx merged PR #5404:
URL: https://github.com/apache/seatunnel/pull/5404
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org