This is an automated email from the ASF dual-hosted git repository.
davidzollo pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new eae2534e16 [Docs][Connector-V2] Improve SensorsData Web3j and
Easysearch docs (#11334)
eae2534e16 is described below
commit eae2534e16b3bfa5b3718b3b6dd25c73b6ae6b87
Author: Daniel Carter <[email protected]>
AuthorDate: Sun Jul 5 11:26:04 2026 +0800
[Docs][Connector-V2] Improve SensorsData Web3j and Easysearch docs (#11334)
Co-authored-by: DanielCarter-stack
<[email protected]>
Co-authored-by: David Zollo <[email protected]>
---
docs/en/connectors/sink/Easysearch.md | 2 +-
docs/en/connectors/sink/SensorsData.md | 64 +++++++++++++++++-------------
docs/en/connectors/source/Easysearch.md | 2 +-
docs/en/connectors/source/Web3j.md | 13 ++++++-
docs/zh/connectors/sink/Easysearch.md | 4 +-
docs/zh/connectors/sink/SensorsData.md | 69 +++++++++++++++++++--------------
docs/zh/connectors/source/Easysearch.md | 4 +-
docs/zh/connectors/source/Web3j.md | 12 +++++-
8 files changed, 105 insertions(+), 65 deletions(-)
diff --git a/docs/en/connectors/sink/Easysearch.md
b/docs/en/connectors/sink/Easysearch.md
index 3816e970cd..671c95838e 100644
--- a/docs/en/connectors/sink/Easysearch.md
+++ b/docs/en/connectors/sink/Easysearch.md
@@ -139,7 +139,7 @@ Choose how to handle the target-side data before starting
the synchronization ta
### common options
-Sink plugin common parameters, please refer to [Sink Common
Options](../common-options/sink-common-options.md) for details
+Sink plugin common parameters, please refer to [Sink Common
Options](../common-options/sink-common-options.md) for details.
## Examples
diff --git a/docs/en/connectors/sink/SensorsData.md
b/docs/en/connectors/sink/SensorsData.md
index ace78c585b..15aad0d4f7 100644
--- a/docs/en/connectors/sink/SensorsData.md
+++ b/docs/en/connectors/sink/SensorsData.md
@@ -10,43 +10,55 @@ import ChangeLog from
'../changelog/connector-sensorsdata.md';
> Flink<br/>
> SeaTunnel Zeta<br/>
-## Key features
+## Key Features
- [ ] [exactly-once](../../introduction/concepts/connector-v2-features.md)
- [ ] [cdc](../../introduction/concepts/connector-v2-features.md)
## Description
-A sink plugin which use SensorsData SDK send data records.
+The SensorsData sink uses the SensorsData SDK to send SeaTunnel rows as
SensorsData records. It
+supports user events, user detail records, and item records. Use `consumer =
"console"` when you
+want to print the converted records locally instead of sending them to the
SensorsData server.
## Sink Options
-| name | type | required | default value |
-|---------------------------|---------|----------|---------------|
-| server_url | string | yes | - |
-| bulk_size | int | no | 50 |
-| max_cache_row_size | int | no | 0 |
-| consumer | string | no | batch |
-| entity_name | string | yes | users |
-| record_type | string | yes | users |
-| schema | string | yes | users |
-| distinct_id_column | string | yes | - |
-| identity_fields | array | yes | - |
-| property_fields | array | yes | - |
-| event_name | string | yes | - |
-| time_column | string | yes | - |
-| time_free | boolean | no | false |
-| detail_id_column | string | no | - |
-| item_id_column | string | no | - |
-| item_type_column | string | no | - |
-| skip_error_record | boolean | no | false |
-| instant_events | array | no | - |
-| distinct_id_by_identities | boolean | no | false |
-| null_as_profile_unset | boolean | no | false |
-| common-options | | no | - |
+| Name | Type | Required | Default | Description |
+|---------------------------|---------|-------------|---------|-------------|
+| server_url | string | Yes | - | SensorsData
data receiving address, for example `https://host:8106/sa?project=default`. |
+| bulk_size | int | No | 50 | Flush
threshold used by the SensorsData SDK cache. |
+| max_cache_row_size | int | No | 0 | Maximum cache
size before an immediate flush. `0` means it follows `bulk_size`. |
+| consumer | string | No | batch | Consumer type.
Use `batch` to send to SensorsData, or `console` to print records for local
checks. |
+| entity_name | string | Yes | users | Entity name.
Supported values are `users` and `items`. |
+| record_type | string | Yes | users | Record type.
Common values are `events`, `details`, and `items`. |
+| schema | string | Conditional | users | Schema name.
Required for user records (`entity_name = "users"`). |
+| distinct_id_column | string | Conditional | - | Input column
used as the SensorsData distinct ID. Required for user records. |
+| identity_fields | array | Conditional | - | Identity
mappings. Required for user records. |
+| property_fields | array | Conditional | - | Property
mappings and target data types. Required for user records. |
+| event_name | string | Conditional | - | Event name or
`${field_name}` expression. Required when `record_type = "events"`. |
+| time_column | string | Conditional | - | Event time
column. Required when `record_type = "events"`. Use `current_time()` to use
processing time. |
+| detail_id_column | string | Conditional | - | Detail ID
column. Required when `record_type = "details"`. |
+| item_id_column | string | Conditional | - | Item ID
column. Required when `record_type = "items"`. |
+| item_type_column | string | Conditional | - | Item type
column. Required when `record_type = "items"`. |
+| time_free | boolean | No | false | Whether to
enable SensorsData historical data mode. |
+| skip_error_record | boolean | No | false | Whether to
skip records that fail conversion. |
+| instant_events | array | No | [] | Event names
that should be marked as instant events. |
+| distinct_id_by_identities | boolean | No | false | Fill distinct
ID from `identity_fields` when `distinct_id_column` is null. |
+| null_as_profile_unset | boolean | No | false | Convert null
profile properties to profile-unset operations. |
+| common-options | config | No | - | Sink common
options. See [Sink Common Options](../common-options/sink-common-options.md). |
## Parameter Interpretation
+
+### Record type requirements
+
+- For user events, set `entity_name = "users"` and `record_type = "events"`,
then configure
+ `event_name`, `time_column`, `distinct_id_column`, `identity_fields`, and
`property_fields`.
+- For user details, set `entity_name = "users"` and `record_type = "details"`,
then configure
+ `detail_id_column`, `distinct_id_column`, `identity_fields`, and
`property_fields`.
+- For item records, set `entity_name = "items"` and `record_type = "items"`,
then configure
+ `item_id_column`, `item_type_column`, and `property_fields`.
+
### server_url [string]
SensorsData data sink address, the format is
`https://${host}:8106/sa?project=${project}`
@@ -85,7 +97,7 @@ The identity fields of the user entity.
### property_fields [array]
-The property fields of the data record. Dupported types:
+The property fields of the data record. Supported types:
- BOOLEAN
- DECIMAL
- INT
diff --git a/docs/en/connectors/source/Easysearch.md
b/docs/en/connectors/source/Easysearch.md
index cef1502f1f..2ce6e1614d 100644
--- a/docs/en/connectors/source/Easysearch.md
+++ b/docs/en/connectors/source/Easysearch.md
@@ -145,7 +145,7 @@ The key password for the trust store specified
### common options
-Source plugin common parameters, please refer to [Source Common
Options](../common-options/source-common-options.md) for details
+Source plugin common parameters, please refer to [Source Common
Options](../common-options/source-common-options.md) for details.
## Examples
diff --git a/docs/en/connectors/source/Web3j.md
b/docs/en/connectors/source/Web3j.md
index cafe557f1d..959fd513fa 100644
--- a/docs/en/connectors/source/Web3j.md
+++ b/docs/en/connectors/source/Web3j.md
@@ -8,7 +8,7 @@ import ChangeLog from '../changelog/connector-web3j.md';
> Spark<br/>
> Flink<br/>
-> Seatunnel Zeta<br/>
+> SeaTunnel Zeta<br/>
## Key Features
@@ -25,6 +25,9 @@ Source connector for Web3j. It reads blockchain data through
a Web3 provider end
the connector reads the latest block number and emits one `value` field. The
`value` field is a JSON
string that contains `blockNumber` and the read timestamp.
+In batch mode, the source emits one row and then finishes. In streaming mode,
it keeps polling the
+provider and emits the latest observed block number.
+
## Source Options
| Name | Type | Required | Default | Description |
@@ -37,6 +40,12 @@ string that contains `blockNumber` and the read timestamp.
|-------|--------|-------------|
| value | String | JSON string containing the latest block number and a
timestamp generated by the connector. |
+The JSON stored in `value` has this shape:
+
+```json
+{"blockNumber":19525949,"timestamp":"2024-03-27T13:28:45.605Z"}
+```
+
## Example
```hocon
@@ -60,7 +69,7 @@ sink {
}
```
-Then you will get the following data:
+Then you will get data similar to the following:
```json
{"value":"{\"blockNumber\":19525949,\"timestamp\":\"2024-03-27T13:28:45.605Z\"}"}
diff --git a/docs/zh/connectors/sink/Easysearch.md
b/docs/zh/connectors/sink/Easysearch.md
index 3f89e1aac5..53f77d6531 100644
--- a/docs/zh/connectors/sink/Easysearch.md
+++ b/docs/zh/connectors/sink/Easysearch.md
@@ -136,9 +136,9 @@ PEM或JKS信任存储的路径。运行SeaTunnel的操作系统用户必须能
- `APPEND_DATA`:保留数据库结构,保留数据
- `ERROR_WHEN_DATA_EXISTS`:有数据时报错
-### common options
+### 通用选项
-Sink 插件通用参数,详见 [Sink Common Options](../common-options/sink-common-options.md)。
+Sink 插件通用参数,详见 [Sink 通用选项](../common-options/sink-common-options.md)。
## 示例
diff --git a/docs/zh/connectors/sink/SensorsData.md
b/docs/zh/connectors/sink/SensorsData.md
index 344bb284d6..9aa6d7688a 100644
--- a/docs/zh/connectors/sink/SensorsData.md
+++ b/docs/zh/connectors/sink/SensorsData.md
@@ -4,49 +4,61 @@ import ChangeLog from '../changelog/connector-sensorsdata.md';
> SensorsData Sink 连接器
-## 支持这些引擎
+## 支持的引擎
> Spark<br/>
> Flink<br/>
> SeaTunnel Zeta<br/>
-## 关键特性
+## 主要特性
- [ ] [精确一次](../../introduction/concepts/connector-v2-features.md)
-- [ ] [cdc](../../introduction/concepts/connector-v2-features.md)
+- [ ] [变更数据捕获](../../introduction/concepts/connector-v2-features.md)
## 描述
-一个 Sink 插件,使用 SensorsData SDK 发送数据记录。
+SensorsData Sink 使用 SensorsData SDK 把 SeaTunnel 行数据发送为 SensorsData 记录。它支持用户事件、
+用户明细记录和物品记录。调试时可以设置 `consumer = "console"`,把转换后的记录打印到控制台,而不是发送到
+SensorsData 服务端。
## Sink 选项
-| 参数名 | 类型 | 必须 | 默认值 |
-|---------------------------|---------|------|--------|
-| server_url | string | 是 | - |
-| bulk_size | int | 否 | 50 |
-| max_cache_row_size | int | 否 | 0 |
-| consumer | string | 否 | batch |
-| entity_name | string | 是 | users |
-| record_type | string | 是 | users |
-| schema | string | 是 | users |
-| distinct_id_column | string | 是 | - |
-| identity_fields | array | 是 | - |
-| property_fields | array | 是 | - |
-| event_name | string | 是 | - |
-| time_column | string | 是 | - |
-| time_free | boolean | 否 | false |
-| detail_id_column | string | 否 | - |
-| item_id_column | string | 否 | - |
-| item_type_column | string | 否 | - |
-| skip_error_record | boolean | 否 | false |
-| instant_events | array | 否 | - |
-| distinct_id_by_identities | boolean | 否 | false |
-| null_as_profile_unset | boolean | 否 | false |
-| common-options | | 否 | - |
+| 参数名 | 类型 | 是否必填 | 默认值 | 说明 |
+|---------------------------|---------|----------|--------|------|
+| server_url | string | 是 | - | SensorsData
数据接收地址,例如 `https://host:8106/sa?project=default`。 |
+| bulk_size | int | 否 | 50 | SensorsData SDK
缓存达到多少条后触发发送。 |
+| max_cache_row_size | int | 否 | 0 | 最大缓存条数,超过后立即发送;`0`
表示跟随 `bulk_size`。 |
+| consumer | string | 否 | batch | 消费方式。`batch` 表示发送到
SensorsData,`console` 表示打印到控制台。 |
+| entity_name | string | 是 | users | 实体名称,支持 `users` 和
`items`。 |
+| record_type | string | 是 | users | 记录类型,常用值为
`events`、`details`、`items`。 |
+| schema | string | 条件必填 | users | Schema
名称。用户记录(`entity_name = "users"`)需要配置。 |
+| distinct_id_column | string | 条件必填 | - | 作为 SensorsData
distinct ID 的输入字段。用户记录需要配置。 |
+| identity_fields | array | 条件必填 | - | 身份字段映射。用户记录需要配置。 |
+| property_fields | array | 条件必填 | - | 属性字段映射和目标类型。用户记录需要配置。 |
+| event_name | string | 条件必填 | - | 事件名或 `${field_name}`
表达式。`record_type = "events"` 时必填。 |
+| time_column | string | 条件必填 | - | 事件时间字段。`record_type =
"events"` 时必填;可用 `current_time()` 表示处理时间。 |
+| detail_id_column | string | 条件必填 | - | 明细 ID 字段。`record_type
= "details"` 时必填。 |
+| item_id_column | string | 条件必填 | - | 物品 ID 字段。`record_type
= "items"` 时必填。 |
+| item_type_column | string | 条件必填 | - | 物品类型字段。`record_type =
"items"` 时必填。 |
+| time_free | boolean | 否 | false | 是否启用 SensorsData
历史数据模式。 |
+| skip_error_record | boolean | 否 | false | 转换失败时是否跳过该条记录。 |
+| instant_events | array | 否 | [] | 标记为即时事件的事件名列表。 |
+| distinct_id_by_identities | boolean | 否 | false | 当
`distinct_id_column` 为空时,是否从 `identity_fields` 中取 distinct ID。 |
+| null_as_profile_unset | boolean | 否 | false | 是否把用户属性中的 null 转成
profile unset 操作。 |
+| common-options | config | 否 | - | Sink 通用选项,详见 [Sink
通用选项](../common-options/sink-common-options.md)。 |
## 参数解释
+
+### 记录类型要求
+
+- 用户事件:设置 `entity_name = "users"` 和 `record_type = "events"`,并配置 `event_name`、
+ `time_column`、`distinct_id_column`、`identity_fields`、`property_fields`。
+- 用户明细:设置 `entity_name = "users"` 和 `record_type = "details"`,并配置
`detail_id_column`、
+ `distinct_id_column`、`identity_fields`、`property_fields`。
+- 物品记录:设置 `entity_name = "items"` 和 `record_type = "items"`,并配置
`item_id_column`、
+ `item_type_column`、`property_fields`。
+
### server_url [string]
SensorsData 数据 Sink 地址,格式为 `https://${host}:8106/sa?project=${project}`
@@ -154,7 +166,7 @@ SensorsData 实体数据模型的模式名称。
### 通用选项
-Sink 插件通用参数,请参考 [Sink 通用选项](../common-options/sink-common-options.md) 详见
+Sink 插件通用参数,详见 [Sink 通用选项](../common-options/sink-common-options.md)。
## 示例
@@ -288,4 +300,3 @@ sink {
## 变更日志
<ChangeLog />
-
diff --git a/docs/zh/connectors/source/Easysearch.md
b/docs/zh/connectors/source/Easysearch.md
index c93ed0034d..c5841d4400 100644
--- a/docs/zh/connectors/source/Easysearch.md
+++ b/docs/zh/connectors/source/Easysearch.md
@@ -139,9 +139,9 @@ PEM或JKS信任存储的路径。运行SeaTunnel的操作系统用户必须能
指定的信任存储的密钥密码
-### common options
+### 通用选项
-Source 插件通用参数,详见 [Source Common
Options](../common-options/source-common-options.md)。
+Source 插件通用参数,详见 [Source 通用选项](../common-options/source-common-options.md)。
## 示例
diff --git a/docs/zh/connectors/source/Web3j.md
b/docs/zh/connectors/source/Web3j.md
index b8aa7d77ad..707181529d 100644
--- a/docs/zh/connectors/source/Web3j.md
+++ b/docs/zh/connectors/source/Web3j.md
@@ -8,7 +8,7 @@ import ChangeLog from '../changelog/connector-web3j.md';
> Spark<br/>
> Flink<br/>
-> Seatunnel Zeta<br/>
+> SeaTunnel Zeta<br/>
## 主要特性
@@ -24,6 +24,8 @@ import ChangeLog from '../changelog/connector-web3j.md';
Web3j 源连接器用于通过 Web3 服务端点读取区块链数据。目前连接器读取最新区块号,并输出一个
`value` 字段。`value` 字段是 JSON 字符串,里面包含 `blockNumber` 和连接器生成的读取时间戳。
+批处理模式下,source 输出一行后结束。流处理模式下,它会持续轮询服务端点,并输出观察到的最新区块号。
+
## 源选项
| 参数名 | 类型 | 必须 | 默认值 | 描述 |
@@ -36,6 +38,12 @@ Web3j 源连接器用于通过 Web3 服务端点读取区块链数据。目前
|------|------|------|
| value | String | JSON 字符串,包含最新区块号和连接器生成的时间戳。 |
+`value` 中保存的 JSON 结构如下:
+
+```json
+{"blockNumber":19525949,"timestamp":"2024-03-27T13:28:45.605Z"}
+```
+
## 示例
```hocon
@@ -59,7 +67,7 @@ sink {
}
```
-然后您将获得以下数据:
+然后可以得到类似下面的数据:
```json
{"value":"{\"blockNumber\":19525949,\"timestamp\":\"2024-03-27T13:28:45.605Z\"}"}