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 1479aab99a [Docs][Connector-V2] Improve Phoenix Enterprise-WeChat
Tablestore and Zendesk connector docs (#11698)
1479aab99a is described below
commit 1479aab99a42476e2e2abe14bc911309902095b0
Author: Daniel Carter <[email protected]>
AuthorDate: Tue Aug 11 22:36:18 2026 +0800
[Docs][Connector-V2] Improve Phoenix Enterprise-WeChat Tablestore and
Zendesk connector docs (#11698)
Co-authored-by: DanielCarter-stack
<[email protected]>
---
docs/en/connectors/sink/Enterprise-WeChat.md | 155 ++++++++++++++++++++++-----
docs/en/connectors/sink/Phoenix.md | 116 ++++++++++++++++----
docs/en/connectors/sink/Tablestore.md | 26 +++--
docs/en/connectors/source/Phoenix.md | 95 +++++++++++-----
docs/en/connectors/source/Tablestore.md | 6 ++
docs/en/connectors/source/Zendesk.md | 121 ++++++++++++++++-----
docs/zh/connectors/sink/Enterprise-WeChat.md | 150 +++++++++++++++++++++-----
docs/zh/connectors/sink/Phoenix.md | 118 +++++++++++++++-----
docs/zh/connectors/sink/Tablestore.md | 26 +++--
docs/zh/connectors/source/Phoenix.md | 91 ++++++++++++----
docs/zh/connectors/source/Tablestore.md | 6 ++
docs/zh/connectors/source/Zendesk.md | 105 +++++++++++++-----
12 files changed, 795 insertions(+), 220 deletions(-)
diff --git a/docs/en/connectors/sink/Enterprise-WeChat.md
b/docs/en/connectors/sink/Enterprise-WeChat.md
index 57c9f5607a..4d12717f5e 100644
--- a/docs/en/connectors/sink/Enterprise-WeChat.md
+++ b/docs/en/connectors/sink/Enterprise-WeChat.md
@@ -4,74 +4,173 @@ import ChangeLog from
'../changelog/connector-http-wechat.md';
> Enterprise WeChat sink connector
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
## Description
-A sink plugin that sends SeaTunnel rows to an Enterprise WeChat robot webhook.
The connector identifier in job
-configuration is `WeChat`.
+A sink plugin that sends SeaTunnel rows to an Enterprise WeChat robot webhook.
The connector
+identifier in job configuration is `WeChat`. Each row is serialized into a
plain-text message with
+the fields rendered as `fieldName: fieldValue` lines before the request is
sent to the webhook.
-> For example, if the data from upstream is [`"alarmStatus": "firing",
"alarmTime": "2022-08-03 01:38:49","alarmContent": "The disk usage exceeds the
threshold"`], the output content to WeChat Robot is the following:
+The connector extends the [Http sink](Http.md) so it inherits the standard
HTTP retry behaviour
+(`retry`, `retry_backoff_multiplier_ms`, `retry_backoff_max_ms`) and the
generic
+`multi_table_sink_replica` option for fan-out writes.
+
+> For example, if the data from upstream is `{"alarmStatus": "firing",
"alarmTime": "2022-08-03 01:38:49", "alarmContent": "The disk usage exceeds the
threshold"}`, the output content to WeChat Robot is the following:
>
> ```
-> alarmStatus: firing
+> alarmStatus: firing
> alarmTime: 2022-08-03 01:38:49
> alarmContent: The disk usage exceeds the threshold
> ```
->
-> **Tips: The WeChat sink sends text messages. Each row is formatted as
`fieldName: fieldValue` lines before it is sent to the webhook.**
## Key features
- [ ] [exactly-once](../../introduction/concepts/connector-v2-features.md)
- [x] [support multiple table
write](../../introduction/concepts/connector-v2-features.md)
+## Data Type Mapping
+
+The connector renders every upstream row as one plain-text message. Each field
is converted to its
+string representation (`String.valueOf(value)`) and emitted on its own line
together with the
+field name, so no per-type JSON structure exists on the wire.
+
+| SeaTunnel Data Type | Enterprise WeChat Message Field |
+|---------------------|---------------------------------|
+| string | `fieldName: string` |
+| tinyint / smallint / int / bigint | `fieldName: number` |
+| float / double | `fieldName: number` |
+| boolean | `fieldName: true/false` |
+| date / time / timestamp | `fieldName: ISO string` |
+| bytes / array / map / row | `fieldName: String(toString)` |
+
## Options
-| name | type | required | default value | description |
-|-----------------------|--------|----------|---------------|-------------|
-| url | String | Yes | - | Enterprise
WeChat robot webhook URL. |
-| mentioned_list | array | No | - | User IDs to
mention. Use `@all` to mention everyone. |
-| mentioned_mobile_list | array | No | - | Mobile phone
numbers to mention. Use `@all` to mention everyone. |
-| retry | int | No | - | Maximum retry
times when the HTTP request throws `IOException`. |
-| retry_backoff_multiplier_ms | int | No | 100 | Retry backoff
multiplier in milliseconds. |
-| retry_backoff_max_ms | int | No | 10000 | Maximum retry
backoff in milliseconds. |
-| multi_table_sink_replica | int | No | - | Number of sink
replicas used when writing multiple tables. |
-| common-options | | no | - | Sink plugin
common parameters. |
+| name | type | required | default value | description
|
+|-----------------------|--------|----------|---------------|--------------------------------------------------------------------------------------------------------------------------|
+| url | String | Yes | - | Enterprise
WeChat robot webhook URL, format
`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=XXXXXX`. |
+| mentioned_list | array | No | - | User IDs to
mention in the group. Use `@all` to mention everyone.
|
+| mentioned_mobile_list | array | No | - | Mobile phone
numbers to mention in the group. Use `@all` to mention everyone.
|
+| retry | int | No | - | Maximum retry
times when the HTTP request throws `IOException`.
|
+| retry_backoff_multiplier_ms | int | No | 100 | Retry backoff
multiplier in milliseconds.
|
+| retry_backoff_max_ms | int | No | 10000 | Maximum retry
backoff in milliseconds.
|
+| multi_table_sink_replica | int | No | 1 | Number of writer
replicas used when writing multiple tables.
|
+| common-options | | no | - | Sink plugin
common parameters, please refer to [Sink Common
Options](../common-options/sink-common-options.md) for details. |
### url [string]
-Enterprise WeChat webhook URL format is
`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=XXXXXX`.
+Enterprise WeChat webhook URL format is
+`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=XXXXXX`. The `key` query
parameter is the
+robot key generated in the Enterprise WeChat group robot settings.
### mentioned_list [array]
-A list of user IDs to mention in the group. Use `@all` to mention everyone. If
the user ID is unavailable, use `mentioned_mobile_list`.
+A list of user IDs to mention in the group. Use `@all` to mention everyone. If
the user ID is
+unavailable, use `mentioned_mobile_list`.
### mentioned_mobile_list [array]
Mobile phone numbers to mention in the group. Use `@all` to mention everyone.
+### retry [int]
+
+Maximum retry times when the HTTP request throws `IOException`. There is no
retry by default. The
+retry loop uses `retry_backoff_multiplier_ms` and `retry_backoff_max_ms` to
compute the wait
+between attempts.
+
+### retry_backoff_multiplier_ms [int]
+
+Base unit (in milliseconds) for the retry backoff. The wait between attempts
grows across retries
+up to `retry_backoff_max_ms`. The growth curve is not a fixed multiplier per
attempt — see
+`HttpClientProvider` (`connector-http-base`) for the exact Fibonacci-based
strategy. Default is `100`.
+
+### retry_backoff_max_ms [int]
+
+Maximum wait between retries, in milliseconds. Default is `10000`.
+
+### multi_table_sink_replica [int]
+
+Number of writer replicas used when writing multiple tables. Increase this
value to add more
+parallel writers per table. Default is `1`.
+
### 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.
-## Example
+## Task Example
-simple:
+### Simple
```hocon
-WeChat {
- url =
"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa"
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+}
+
+source {
+ FakeSource {
+ row.num = 1
+ schema = {
+ fields {
+ alarmStatus = string
+ alarmTime = string
+ alarmContent = string
+ }
+ }
+ rows = [
+ {
+ fields = ["firing", "2022-08-03 01:38:49", "The disk usage exceeds the
threshold"]
+ }
+ ]
+ }
+}
+
+sink {
+ WeChat {
+ url =
"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa"
+ }
}
```
+### Mention users and phone numbers
+
```hocon
-WeChat {
- url =
"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa"
- mentioned_list = ["wangqing", "@all"]
- mentioned_mobile_list = ["13800001111", "@all"]
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+}
+
+source {
+ FakeSource {
+ row.num = 1
+ schema = {
+ fields {
+ alarmStatus = string
+ alarmTime = string
+ alarmContent = string
+ }
+ }
+ rows = [
+ {
+ fields = ["firing", "2022-08-03 01:38:49", "The disk usage exceeds the
threshold"]
+ }
+ ]
+ }
+}
+
+sink {
+ WeChat {
+ url =
"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa"
+ mentioned_list = ["wangqing", "@all"]
+ mentioned_mobile_list = ["13800001111", "@all"]
+ }
}
```
## Changelog
<ChangeLog />
-
diff --git a/docs/en/connectors/sink/Phoenix.md
b/docs/en/connectors/sink/Phoenix.md
index a56599ae9e..03635a80a4 100644
--- a/docs/en/connectors/sink/Phoenix.md
+++ b/docs/en/connectors/sink/Phoenix.md
@@ -4,16 +4,30 @@ import ChangeLog from '../changelog/connector-jdbc.md';
> Phoenix sink connector
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
## Description
-Write Phoenix data through [Jdbc connector](Jdbc.md).
-Support Batch mode and Streaming mode. The tested Phoenix version is 4.xx and
5.xx
-On the underlying implementation, through the jdbc driver of Phoenix, execute
the upsert statement to write data to HBase.
-Two ways of connecting Phoenix with Java JDBC. One is to connect to zookeeper
through JDBC, and the other is to connect to queryserver through JDBC thin
client.
+Write data to Apache Phoenix through the [Jdbc connector](Jdbc.md). The
connector identifier used in
+the job configuration is `Jdbc`. Tested Phoenix versions are 4.x and 5.x.
+
+Under the hood, the connector uses Phoenix's JDBC driver to execute an
`upsert` statement that
+writes each row to HBase.
-> Tips: By default, the (thin) driver jar is used. If you want to use the
(thick) driver or other versions of Phoenix (thin) driver, you need to
recompile the jdbc connector module
+There are two ways to connect Phoenix through Java JDBC:
+
+- Connect to the ZooKeeper quorum with the **thick** driver.
+- Connect to the Phoenix Query Server with the **thin** driver.
+
+> **Tip 1:** The (thin) driver jar is used by default. If you want to use the
(thick) driver or
+> another version of the Phoenix (thin) driver, you need to recompile the
`connector-jdbc` module.
>
-> Tips: Not support exactly-once semantics (XA transaction is not yet
supported in Phoenix).
+> **Tip 2:** This connector does not support exactly-once semantics, because
Phoenix does not yet
+> support XA transactions.
## Key features
@@ -21,42 +35,102 @@ Two ways of connecting Phoenix with Java JDBC. One is to
connect to zookeeper th
## Options
+| Name | Type | Required | Default Value | Description
|
+|----------------|--------|----------|---------------|----------------------------------------------------------------------------------------------------------|
+| driver | String | Yes | - | JDBC driver class. Use
`org.apache.phoenix.jdbc.PhoenixDriver` for the thick driver, or
`org.apache.phoenix.queryserver.client.Driver` for the thin driver. |
+| url | String | Yes | - | JDBC connection URL.
Use `jdbc:phoenix:localhost:2182/hbase` for the thick driver, or
`jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF` for the
thin driver. |
+| query | String | Yes | - | Phoenix upsert
statement executed for every write, for example `upsert into test.sink(age,
name) values(?, ?)`. `?` placeholders are bound positionally from the upstream
row. |
+| common-options | | No | - | Sink plugin common
parameters, please refer to [Sink Common
Options](../common-options/sink-common-options.md) for details. |
+
### driver [string]
-if you use phoenix (thick) driver the value is
`org.apache.phoenix.jdbc.PhoenixDriver` or you use (thin) driver the value is
`org.apache.phoenix.queryserver.client.Driver`
+JDBC driver class. Use `org.apache.phoenix.jdbc.PhoenixDriver` for the thick
driver, or
+`org.apache.phoenix.queryserver.client.Driver` for the thin driver.
### url [string]
-if you use phoenix (thick) driver the value is
`jdbc:phoenix:localhost:2182/hbase` or you use (thin) driver the value is
`jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF`
+JDBC connection URL. Use `jdbc:phoenix:localhost:2182/hbase` for the thick
driver, or
+`jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF` for the
thin driver.
+
+### query [string]
+
+Phoenix upsert statement executed for every write. The `?` placeholders are
bound positionally from
+the upstream row, so the column order in the upsert must match the field order
declared by the
+upstream schema. Use the table name with a fully-qualified schema (for example
+`test.sink`), not the bare table name.
### 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.
-## Example
+## Task Example
-use thick client drive
+### Use the thick client driver
-```
- Jdbc {
- driver = org.apache.phoenix.jdbc.PhoenixDriver
- url = "jdbc:phoenix:localhost:2182/hbase"
- query = "upsert into test.sink(age, name) values(?, ?)"
+```hocon
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+}
+
+source {
+ FakeSource {
+ row.num = 2
+ schema = {
+ fields {
+ age = int
+ name = string
+ }
}
+ rows = [
+ { kind = INSERT, fields = [10, "jared"] }
+ { kind = INSERT, fields = [20, "huan"] }
+ ]
+ }
+}
+sink {
+ Jdbc {
+ driver = org.apache.phoenix.jdbc.PhoenixDriver
+ url = "jdbc:phoenix:localhost:2182/hbase"
+ query = "upsert into test.sink(age, name) values(?, ?)"
+ }
+}
```
-use thin client drive
+### Use the thin client driver
-```
-Jdbc {
+```hocon
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+}
+
+source {
+ FakeSource {
+ row.num = 2
+ schema = {
+ fields {
+ age = int
+ name = string
+ }
+ }
+ rows = [
+ { kind = INSERT, fields = [10, "jared"] }
+ { kind = INSERT, fields = [20, "huan"] }
+ ]
+ }
+}
+
+sink {
+ Jdbc {
driver = org.apache.phoenix.queryserver.client.Driver
url =
"jdbc:phoenix:thin:url=http://spark_e2e_phoenix_sink:8765;serialization=PROTOBUF"
query = "upsert into test.sink(age, name) values(?, ?)"
+ }
}
```
## Changelog
-<ChangeLog />
-
+<ChangeLog />
\ No newline at end of file
diff --git a/docs/en/connectors/sink/Tablestore.md
b/docs/en/connectors/sink/Tablestore.md
index a5a17744db..be8531af9a 100644
--- a/docs/en/connectors/sink/Tablestore.md
+++ b/docs/en/connectors/sink/Tablestore.md
@@ -4,6 +4,12 @@ import ChangeLog from '../changelog/connector-tablestore.md';
> Tablestore sink connector
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
## Description
Write SeaTunnel rows to Alibaba Cloud Tablestore.
@@ -15,6 +21,16 @@ Write SeaTunnel rows to Alibaba Cloud Tablestore.
- [ ] [support multiple table
write](../../introduction/concepts/connector-v2-features.md)
- [ ] [timer flush](../../introduction/concepts/connector-v2-features.md)
+## Data Type Mapping
+
+| SeaTunnel type | Tablestore attribute column type |
Tablestore primary key type |
+|----------------------------------------|----------------------------------|-----------------------------|
+| `INT`, `TINYINT`, `SMALLINT`, `BIGINT` | `INTEGER` |
`INTEGER` |
+| `FLOAT`, `DOUBLE`, `DECIMAL` | `DOUBLE` |
`STRING` |
+| `STRING`, `DATE`, `TIME`, `TIMESTAMP` | `STRING` |
`STRING` |
+| `BOOLEAN` | `BOOLEAN` |
`STRING` |
+| `BYTES` | `BINARY` |
`BINARY` |
+
## Options
| name | type | required | default value | description
|
@@ -89,16 +105,6 @@ sink {
}
```
-## Type mapping
-
-| SeaTunnel type | Tablestore attribute column type |
Tablestore primary key type |
-|----------------------------------------|----------------------------------|-----------------------------|
-| `INT`, `TINYINT`, `SMALLINT`, `BIGINT` | `INTEGER` |
`INTEGER` |
-| `FLOAT`, `DOUBLE`, `DECIMAL` | `DOUBLE` |
`STRING` |
-| `STRING`, `DATE`, `TIME`, `TIMESTAMP` | `STRING` |
`STRING` |
-| `BOOLEAN` | `BOOLEAN` |
`STRING` |
-| `BYTES` | `BINARY` |
`BINARY` |
-
## Changelog
<ChangeLog />
diff --git a/docs/en/connectors/source/Phoenix.md
b/docs/en/connectors/source/Phoenix.md
index 64ce316e9e..89b09c0994 100644
--- a/docs/en/connectors/source/Phoenix.md
+++ b/docs/en/connectors/source/Phoenix.md
@@ -4,14 +4,27 @@ import ChangeLog from '../changelog/connector-jdbc.md';
> Phoenix source connector
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
## Description
-Read Phoenix data through [Jdbc connector](Jdbc.md).
-Support Batch mode and Streaming mode. The tested Phoenix version is 4.xx and
5.xx
-On the underlying implementation, through the jdbc driver of Phoenix, execute
the upsert statement to write data to HBase.
-Two ways of connecting Phoenix with Java JDBC. One is to connect to zookeeper
through JDBC, and the other is to connect to queryserver through JDBC thin
client.
+Read data from Apache Phoenix through the [Jdbc connector](Jdbc.md). The
connector identifier used
+in the job configuration is `Jdbc`. Tested Phoenix versions are 4.x and 5.x.
+
+Under the hood, the connector uses Phoenix's JDBC driver to execute the query
and read rows from
+HBase. Supports column projection through the standard `SELECT ...` syntax.
-> Tips: By default, the (thin) driver jar is used. If you want to use the
(thick) driver or other versions of Phoenix (thin) driver, you need to
recompile the jdbc connector module
+There are two ways to connect Phoenix through Java JDBC:
+
+- Connect to the ZooKeeper quorum with the **thick** driver.
+- Connect to the Phoenix Query Server with the **thin** driver.
+
+> **Tip:** The (thin) driver jar is used by default. If you want to use the
(thick) driver or another
+> version of the Phoenix (thin) driver, you need to recompile the
`connector-jdbc` module.
## Key features
@@ -19,50 +32,84 @@ Two ways of connecting Phoenix with Java JDBC. One is to
connect to zookeeper th
- [x] [stream](../../introduction/concepts/connector-v2-features.md)
- [ ] [exactly-once](../../introduction/concepts/connector-v2-features.md)
- [x] [column projection](../../introduction/concepts/connector-v2-features.md)
-
-supports query SQL and can achieve projection effect.
-
- [ ] [parallelism](../../introduction/concepts/connector-v2-features.md)
- [ ] [support user-defined
split](../../introduction/concepts/connector-v2-features.md)
+Supports standard SQL queries and column projection.
+
## Options
+| Name | Type | Required | Default Value | Description
|
+|----------------|--------|----------|---------------|----------------------------------------------------------------------------------------------------------|
+| driver | String | Yes | - | JDBC driver class. Use
`org.apache.phoenix.jdbc.PhoenixDriver` for the thick driver, or
`org.apache.phoenix.queryserver.client.Driver` for the thin driver. |
+| url | String | Yes | - | JDBC connection URL.
Use `jdbc:phoenix:localhost:2182/hbase` for the thick driver, or
`jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF` for the
thin driver. |
+| query | String | Yes | - | SELECT query executed
to read rows, for example `select age, name from test.source`. The column order
in the SELECT list must match `schema.fields`. |
+| common-options | | No | - | Source plugin common
parameters, please refer to [Source Common
Options](../common-options/source-common-options.md) for details. |
+
### driver [string]
-if you use phoenix (thick) driver the value is
`org.apache.phoenix.jdbc.PhoenixDriver` or you use (thin) driver the value is
`org.apache.phoenix.queryserver.client.Driver`
+JDBC driver class. Use `org.apache.phoenix.jdbc.PhoenixDriver` for the thick
driver, or
+`org.apache.phoenix.queryserver.client.Driver` for the thin driver.
### url [string]
-if you use phoenix (thick) driver the value is
`jdbc:phoenix:localhost:2182/hbase` or you use (thin) driver the value is
`jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF`
+JDBC connection URL. Use `jdbc:phoenix:localhost:2182/hbase` for the thick
driver, or
+`jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF` for the
thin driver.
+
+### query [string]
+
+SELECT query executed to read rows from Phoenix. Use the table name with a
fully-qualified schema
+(for example `test.source`), not the bare table name. Column projection is
supported by listing
+only the columns you need in the SELECT clause.
### 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.
-## Example
+## Task Example
-use thick client drive
+### Use the thick client driver
-```
- Jdbc {
- driver = org.apache.phoenix.jdbc.PhoenixDriver
- url = "jdbc:phoenix:localhost:2182/hbase"
- query = "select age, name from test.source"
- }
+```hocon
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+}
+
+source {
+ Jdbc {
+ driver = org.apache.phoenix.jdbc.PhoenixDriver
+ url = "jdbc:phoenix:localhost:2182/hbase"
+ query = "select age, name from test.source"
+ }
+}
+sink {
+ Console {}
+}
```
-use thin client drive
+### Use the thin client driver
-```
-Jdbc {
+```hocon
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+}
+
+source {
+ Jdbc {
driver = org.apache.phoenix.queryserver.client.Driver
url =
"jdbc:phoenix:thin:url=http://spark_e2e_phoenix_sink:8765;serialization=PROTOBUF"
query = "select age, name from test.source"
+ }
+}
+
+sink {
+ Console {}
}
```
## Changelog
-<ChangeLog />
-
+<ChangeLog />
\ No newline at end of file
diff --git a/docs/en/connectors/source/Tablestore.md
b/docs/en/connectors/source/Tablestore.md
index 69395aead1..70646d4f7d 100644
--- a/docs/en/connectors/source/Tablestore.md
+++ b/docs/en/connectors/source/Tablestore.md
@@ -4,6 +4,12 @@ import ChangeLog from '../changelog/connector-tablestore.md';
> Tablestore source connector
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
## Description
Read full and incremental data from Alibaba Cloud Tablestore. The source uses
Tablestore Tunnel in `BaseAndStream` mode, so it can read existing data first
and then consume later changes.
diff --git a/docs/en/connectors/source/Zendesk.md
b/docs/en/connectors/source/Zendesk.md
index 94b7382a8d..cefc2f158a 100644
--- a/docs/en/connectors/source/Zendesk.md
+++ b/docs/en/connectors/source/Zendesk.md
@@ -4,9 +4,20 @@ import ChangeLog from '../changelog/connector-http-zendesk.md';
> Zendesk source connector
+## Support Those Engines
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
## Description
-Used to read data from the [Zendesk REST
API](https://developer.zendesk.com/api-reference/). It authenticates with a
Zendesk account email and API token (sent as an HTTP Basic `Authorization`
header) and reads a Zendesk endpoint such as tickets, users, or organizations
into SeaTunnel rows.
+Used to read data from the [Zendesk REST
API](https://developer.zendesk.com/api-reference/). It
+authenticates with a Zendesk account email and API token (sent as an HTTP
Basic `Authorization`
+header) and reads a Zendesk endpoint such as tickets, users, or organizations
into SeaTunnel rows.
+
+This connector is built on top of the [Http source](Http.md) connector and
inherits most of its
+options. The differences are the required authentication options and the
`format` default.
## Key features
@@ -19,68 +30,116 @@ Used to read data from the [Zendesk REST
API](https://developer.zendesk.com/api-
## Options
-| name | type | required | default value |
-|-----------------------------|---------|----------|---------------|
-| url | String | Yes | - |
-| email | String | Yes | - |
-| api_token | String | Yes | - |
-| method | String | No | get |
-| schema | Config | No | - |
-| format | String | No | text |
-| params | Map | No | - |
-| body | String | No | - |
-| json_field | Config | No | - |
-| content_field | String | No | - |
-| poll_interval_millis | int | No | - |
-| retry | int | No | - |
-| retry_backoff_multiplier_ms | int | No | 100 |
-| retry_backoff_max_ms | int | No | 10000 |
-| enable_multi_lines | boolean | No | false |
-| common-options | config | No | - |
+| name | type | required | default value |
description
|
+|-----------------------------|---------|----------|---------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| url | String | Yes | - | The
Zendesk REST API endpoint to read from, for example
`https://your-subdomain.zendesk.com/api/v2/tickets.json`.
|
+| email | String | Yes | - | The
Zendesk account email used for API token authentication. It is combined with
`api_token` as `{email}/token:{api_token}` and sent as an HTTP Basic
`Authorization` header.
|
+| api_token | String | Yes | - | The
Zendesk API token. See the [Zendesk API token
docs](https://support.zendesk.com/hc/en-us/articles/4408889192858) for how to
generate one.
|
+| method | String | No | get | HTTP
request method. Only `GET` and `POST` are supported.
|
+| schema | Config | No | - | The
structure of the data, including field names and field types. For more details,
please refer to [Schema
Feature](../../introduction/concepts/schema-feature.md).
|
+| format | String | No | text | The
format of upstream data, only `json` and `text` are supported.
|
+| params | Map | No | - | Query
parameters appended to the request URL.
|
+| body | String | No | - | Request
body sent for `POST` (or any method that accepts a body). When `format =
"json"`, the body must be valid JSON.
|
+| json_field | Config | No | - | Maps JSON
paths in the response to schema fields. Must be used together with `schema`.
See the [Http source](./Http.md) connector for details and examples.
|
+| content_field | String | No | - | Extracts
a sub-section of the JSON response (for example the array under a top-level key
such as `tickets` or `users`) before mapping to rows. See the [Http
source](./Http.md) connector for details and examples. |
+| poll_interval_millis | int | No | - | Interval
in milliseconds between two consecutive requests when running in streaming
mode.
|
+| retry | int | No | - | Maximum
retry times when the HTTP request throws `IOException`.
|
+| retry_backoff_multiplier_ms | int | No | 100 | Retry
backoff multiplier in milliseconds.
|
+| retry_backoff_max_ms | int | No | 10000 | Maximum
retry backoff in milliseconds.
|
+| enable_multi_lines | boolean | No | false | Whether
to parse the response as multiple JSON objects separated by newlines. Only
takes effect when `format = "json"`.
|
+| common-options | config | No | - | Source
plugin common parameters, please refer to [Source Common
Options](../common-options/source-common-options.md) for details.
|
### url [String]
-The Zendesk REST API endpoint to read from, for example
`https://your-subdomain.zendesk.com/api/v2/tickets.json`.
+The Zendesk REST API endpoint to read from, for example
+`https://your-subdomain.zendesk.com/api/v2/tickets.json`.
### email [String]
-The Zendesk account email used for API token authentication. It is combined
with `api_token` as `{email}/token:{api_token}` and sent as an HTTP Basic
`Authorization` header.
+The Zendesk account email used for API token authentication. It is combined
with `api_token` as
+`{email}/token:{api_token}` and sent as an HTTP Basic `Authorization` header.
### api_token [String]
-The Zendesk API token. See the [Zendesk API token
docs](https://support.zendesk.com/hc/en-us/articles/4408889192858) for how to
generate one.
+The Zendesk API token. See the [Zendesk API token
docs](https://support.zendesk.com/hc/en-us/articles/4408889192858)
+for how to generate one.
### method [String]
-http request method, only supports GET, POST method.
+HTTP request method. Only `GET` and `POST` are supported. `POST` is typically
used together with
+`body` for paginated or query-driven Zendesk endpoints.
### schema [Config]
-The structure of the data, including field names and field types. For more
details, please refer to [Schema
Feature](../../introduction/concepts/schema-feature.md).
+The structure of the data, including field names and field types. For more
details, please refer to
+[Schema Feature](../../introduction/concepts/schema-feature.md).
### format [String]
-the format of upstream data, now only support `json` `text`, default `text`.
+The format of upstream data. Only `json` and `text` are supported; default is
`text`. Zendesk
+endpoints always return JSON, so set `format = "json"` together with
`content_field` to extract
+the result array before mapping to rows.
### params [Map]
-http params
+Query parameters appended to the request URL. Use this for Zendesk endpoints
that accept filters,
+pagination, or other query parameters.
+
+### body [String]
+
+Request body sent for `POST` (or any method that accepts a body). When `format
= "json"`, the body
+must be valid JSON.
### json_field [Config]
-This parameter helps you configure the schema, so this parameter must be used
with schema. It maps JSON paths in the response to schema fields. See the [Http
source](./Http.md) connector for details and examples.
+This parameter helps you configure the schema, so this parameter must be used
with `schema`. It maps
+JSON paths in the response to schema fields. See the [Http source](./Http.md)
connector for details
+and examples.
### content_field [String]
-This parameter can extract a sub-section of the JSON response (for example the
array under a top-level key such as `tickets` or `users`) before mapping to
rows. See the [Http source](./Http.md) connector for details and examples.
+This parameter extracts a sub-section of the JSON response (for example the
array under a top-level
+key such as `tickets` or `users`) before mapping to rows. Use `content_field =
"$.tickets.*"` when
+reading `/api/v2/tickets.json`, since the ticket rows live under the `tickets`
key. See the
+[Http source](./Http.md) connector for details and examples.
+
+### poll_interval_millis [int]
+
+Interval in milliseconds between two consecutive requests when the connector
runs in streaming mode.
+Has no effect in batch mode.
+
+### retry [int]
+
+Maximum retry times when the HTTP request throws `IOException`. The retry loop
uses
+`retry_backoff_multiplier_ms` and `retry_backoff_max_ms` to compute the wait
between attempts.
+
+### retry_backoff_multiplier_ms [int]
+
+Base unit (in milliseconds) for the retry backoff. The wait between attempts
grows across retries
+up to `retry_backoff_max_ms`. The growth curve is not a fixed multiplier per
attempt — see
+`HttpClientProvider` (`connector-http-base`) for the exact Fibonacci-based
strategy.
+
+### retry_backoff_max_ms [int]
+
+Maximum wait between retries, in milliseconds.
+
+### enable_multi_lines [boolean]
+
+Whether to parse the response as multiple JSON objects separated by newlines.
Only takes effect when
+`format = "json"`.
### common options
Source plugin common parameters, please refer to [Source Common
Options](../common-options/source-common-options.md) for details.
-## Example
+## Task Example
```hocon
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+}
+
source {
Zendesk {
url = "https://your-subdomain.zendesk.com/api/v2/tickets.json"
@@ -101,6 +160,10 @@ source {
}
}
}
+
+sink {
+ Console {}
+}
```
## Changelog
diff --git a/docs/zh/connectors/sink/Enterprise-WeChat.md
b/docs/zh/connectors/sink/Enterprise-WeChat.md
index 88cc334e37..eb1415973f 100644
--- a/docs/zh/connectors/sink/Enterprise-WeChat.md
+++ b/docs/zh/connectors/sink/Enterprise-WeChat.md
@@ -2,71 +2,167 @@ import ChangeLog from
'../changelog/connector-http-wechat.md';
# Enterprise WeChat
-> Enterprise WeChat 接收器连接器
+> 企业微信 接收器连接器
+
+## 支持的引擎
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
## 描述
-一个将 SeaTunnel 行数据发送到企业微信机器人 webhook 的接收插件。作业配置中的连接器标识符是 `WeChat`。
+一个将 SeaTunnel 行数据发送到企业微信机器人 webhook 的接收器插件。作业配置中的连接器标识符为
+`WeChat`。每一行数据会按 `字段名: 字段值` 的格式序列化为多行纯文本消息,再发送到 webhook。
+
+该连接器继承自 [Http sink](Http.md),因此自带标准的 HTTP 重试参数(`retry`、
+`retry_backoff_multiplier_ms`、`retry_backoff_max_ms`),并支持通用的
+`multi_table_sink_replica` 选项以调整多表写入的并行度。
-> 例如,如果来自上游的数据是 [`"alarmStatus": "firing", "alarmTime": "2022-08-03
01:38:49","alarmContent": "The disk usage exceeds the threshold"`],
微信机器人的输出内容如下:
+> 例如,如果上游数据为 `{"alarmStatus": "firing", "alarmTime": "2022-08-03 01:38:49",
"alarmContent": "The disk usage exceeds the threshold"}`,企业微信机器人收到的内容如下:
>
> ```
-> alarmStatus: firing
+> alarmStatus: firing
> alarmTime: 2022-08-03 01:38:49
> alarmContent: The disk usage exceeds the threshold
> ```
->
-> **提示:WeChat 接收器发送文本消息。每一行数据会先格式化为 `字段名: 字段值` 的多行文本,再发送到 webhook。**
## 关键特性
- [ ] [精确一次](../../introduction/concepts/connector-v2-features.md)
- [x] [支持多表写入](../../introduction/concepts/connector-v2-features.md)
+## 数据类型映射
+
+连接器会把每一行渲染为一条纯文本消息,每个字段都通过 `String.valueOf(value)` 转换为字符串,
+并以 `字段名: 字段值` 的格式独立成行。线上消息是纯文本,不存在按类型区分的 JSON 结构。
+
+| SeaTunnel 数据类型 | 企业微信消息字段 |
+|--------------------|-----------------|
+| string | `字段名: string` |
+| tinyint / smallint / int / bigint | `字段名: number` |
+| float / double | `字段名: number` |
+| boolean | `字段名: true/false` |
+| date / time / timestamp | `字段名: ISO 字符串` |
+| bytes / array / map / row | `字段名: String(toString)` |
+
## 选项
-| 名称 | 类型 | 必需 | 默认值 | 描述 |
-|-----------------------|--------|------|--------|------|
-| url | String | 是 | - | 企业微信机器人 webhook URL。 |
-| mentioned_list | array | 否 | - | 需要提醒的用户 ID 列表,使用 `@all`
提醒所有人。 |
-| mentioned_mobile_list | array | 否 | - | 需要提醒的手机号列表,使用 `@all` 提醒所有人。 |
-| retry | int | 否 | - | HTTP 请求抛出 `IOException`
时的最大重试次数。 |
-| retry_backoff_multiplier_ms | int | 否 | 100 | 重试退避倍数,单位毫秒。 |
-| retry_backoff_max_ms | int | 否 | 10000 | 最大重试退避时间,单位毫秒。 |
-| multi_table_sink_replica | int | 否 | - | 多表写入时使用的 sink 副本数。 |
-| common-options | | 否 | - | 接收器插件通用参数。 |
+| 名称 | 类型 | 是否必填 | 默认值 | 描述
|
+|-----------------------|--------|----------|--------|---------------------------------------------------------------------------------------------------------------------|
+| url | String | 是 | - | 企业微信机器人 webhook URL,格式
`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=XXXXXX`。
|
+| mentioned_list | array | 否 | - | 需要提醒的用户 ID 列表,使用 `@all`
提醒所有人。 |
+| mentioned_mobile_list | array | 否 | - | 需要提醒的手机号列表,使用 `@all`
提醒所有人。 |
+| retry | int | 否 | - | HTTP 请求抛出 `IOException`
时的最大重试次数。默认不重试。 |
+| retry_backoff_multiplier_ms | int | 否 | 100 | 重试退避倍数,单位毫秒。
|
+| retry_backoff_max_ms | int | 否 | 10000 | 最大重试退避时间,单位毫秒。
|
+| multi_table_sink_replica | int | 否 | 1 | 多表写入时使用的写入器副本数。
|
+| common-options | | 否 | - | 接收器插件通用参数,详见 [Sink
通用选项](../common-options/sink-common-options.md)。
|
### url [string]
-企业微信 webhook URL 格式为
`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=XXXXXX`。
+企业微信 webhook URL,格式
`https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=XXXXXX`。`key`
+查询参数是在企业微信群机器人设置中生成的机器人 key。
### mentioned_list [array]
-需要提醒的用户 ID 列表,使用 `@all` 提醒所有人。如果无法获取用户 ID,可以使用 `mentioned_mobile_list`。
+需要提醒的用户 ID 列表,使用 `@all` 提醒所有人。如果无法获取用户 ID,可以使用
+`mentioned_mobile_list`。
### mentioned_mobile_list [array]
需要提醒的手机号列表,使用 `@all` 提醒所有人。
+### retry [int]
+
+HTTP 请求抛出 `IOException` 时的最大重试次数,默认不重试。重试间隔由
+`retry_backoff_multiplier_ms` 和 `retry_backoff_max_ms` 共同决定。
+
+### retry_backoff_multiplier_ms [int]
+
+重试退避的基础单位,单位毫秒。重试之间的等待时间会在多次重试中逐渐增长,上限为
+`retry_backoff_max_ms`。增长曲线并不是每次固定的倍数关系,具体的斐波那契策略请参考
+`HttpClientProvider`(位于 `connector-http-base`)。默认 `100`。
+
+### retry_backoff_max_ms [int]
+
+最大重试退避时间,单位毫秒。默认 `10000`。
+
+### multi_table_sink_replica [int]
+
+多表写入时使用的写入器副本数。增加该值可以在每个表上启动更多并行写入器。默认 `1`。
+
### common options
-接收器插件常用参数,详见 [Sink Common Options](../common-options/sink-common-options.md)
+接收器插件通用参数,详见 [Sink 通用选项](../common-options/sink-common-options.md)。
-## 示例
+## 任务示例
-简单的例子:
+### 简单示例
```hocon
-WeChat {
- url =
"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa"
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+}
+
+source {
+ FakeSource {
+ row.num = 1
+ schema = {
+ fields {
+ alarmStatus = string
+ alarmTime = string
+ alarmContent = string
+ }
+ }
+ rows = [
+ {
+ fields = ["firing", "2022-08-03 01:38:49", "The disk usage exceeds the
threshold"]
+ }
+ ]
+ }
+}
+
+sink {
+ WeChat {
+ url =
"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa"
+ }
}
```
+### 同时 @ 指定用户和手机号
+
```hocon
-WeChat {
- url =
"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa"
- mentioned_list = ["wangqing", "@all"]
- mentioned_mobile_list = ["13800001111", "@all"]
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+}
+
+source {
+ FakeSource {
+ row.num = 1
+ schema = {
+ fields {
+ alarmStatus = string
+ alarmTime = string
+ alarmContent = string
+ }
+ }
+ rows = [
+ {
+ fields = ["firing", "2022-08-03 01:38:49", "The disk usage exceeds the
threshold"]
+ }
+ ]
+ }
+}
+
+sink {
+ WeChat {
+ url =
"https://qyapi.weixin.qq.com/cgi-bin/webhook/send?key=693axxx6-7aoc-4bc4-97a0-0ec2sifa5aaa"
+ mentioned_list = ["wangqing", "@all"]
+ mentioned_mobile_list = ["13800001111", "@all"]
+ }
}
```
diff --git a/docs/zh/connectors/sink/Phoenix.md
b/docs/zh/connectors/sink/Phoenix.md
index 37fe5feb47..2eeae60f36 100644
--- a/docs/zh/connectors/sink/Phoenix.md
+++ b/docs/zh/connectors/sink/Phoenix.md
@@ -4,60 +4,130 @@ import ChangeLog from '../changelog/connector-jdbc.md';
> Phoenix 数据接收器
+## 支持的引擎
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
## 描述
-该接收器是通过 [Jdbc数据连接器](Jdbc.md)来写Phoenix数据,支持批和流两种模式。测试的Phoenix版本为4.xx和5.xx。
-在底层实现上,通过Phoenix的jdbc驱动,执行upsert语句向HBase写入数据。
-使用Java JDBC连接Phoenix有两种方式:其一是使用JDBC连接zookeeper,其二是通过JDBC瘦客户端连接查询服务器。
+通过 [Jdbc 连接器](Jdbc.md) 把数据写入 Apache Phoenix。作业配置中使用的连接器标识符为 `Jdbc`。
+已测试的 Phoenix 版本为 4.x 和 5.x。
+
+底层通过 Phoenix 的 JDBC 驱动执行 `upsert` 语句将每一行写入 HBase。
+
+使用 Java JDBC 连接 Phoenix 有两种方式:
+
+- 通过 **thick** 驱动连接 ZooKeeper 集群;
+- 通过 **thin** 驱动连接 Phoenix Query Server。
-> 提示1:
该接收器默认使用的是(thin)驱动jar包。如果需要使用(thick)驱动或者其他版本的Phoenix(thin)驱动,需要重新编译jdbc数据接收器模块。
+> **提示 1:** 默认使用(thin)驱动 jar。如果需要使用(thick)驱动或者其他版本的 Phoenix(thin)
+> 驱动,需要重新编译 `connector-jdbc` 模块。
>
-> 提示2: 该接收器还不支持精准一次语义(因为Phoenix还不支持XA事务)。
+> **提示 2:** 当前接收器不支持精确一次语义,因为 Phoenix 暂不支持 XA 事务。
## 主要特性
-- [ ] [精准一次](../../introduction/concepts/connector-v2-features.md)
-- [ ] [timer flush](../../introduction/concepts/connector-v2-features.md)
+- [ ] [精确一次](../../introduction/concepts/connector-v2-features.md)
-## 接收器选项
+## 选项
+
+| 名称 | 类型 | 是否必填 | 默认值 | 描述
|
+|----------------|--------|----------|--------|-------------------------------------------------------------------------------------------------|
+| driver | String | 是 | - | JDBC 驱动类。thick 驱动使用
`org.apache.phoenix.jdbc.PhoenixDriver`,thin 驱动使用
`org.apache.phoenix.queryserver.client.Driver`。 |
+| url | String | 是 | - | JDBC 连接 URL。thick 驱动使用
`jdbc:phoenix:localhost:2182/hbase`,thin 驱动使用
`jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF`。 |
+| query | String | 是 | - | 写入数据时执行的 Phoenix upsert 语句,例如
`upsert into test.sink(age, name) values(?, ?)`。`?` 占位符会按位置绑定到上游行字段。 |
+| common-options | | 否 | - | 接收器插件通用参数,详见 [Sink
通用选项](../common-options/sink-common-options.md)。 |
### driver [string]
-phoenix(thick)驱动:`org.apache.phoenix.jdbc.PhoenixDriver`
-phoenix(thin)驱动:`org.apache.phoenix.queryserver.client.Driver`
+JDBC 驱动类。thick 驱动使用 `org.apache.phoenix.jdbc.PhoenixDriver`,thin 驱动使用
+`org.apache.phoenix.queryserver.client.Driver`。
### url [string]
-phoenix(thick)驱动:`jdbc:phoenix:localhost:2182/hbase`
-phoenix(thin)驱动:`jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF`
+JDBC 连接 URL。thick 驱动使用 `jdbc:phoenix:localhost:2182/hbase`,thin 驱动使用
+`jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF`。
+
+### query [string]
+
+写入数据时执行的 Phoenix upsert 语句。`?` 占位符会按位置绑定到上游行字段,因此 upsert 中列的
+顺序需要和上游 `schema.fields` 的字段顺序一致。表名要使用带 schema 的完全限定名(例如
+`test.sink`),不能只写表名。
### common options
-Sink插件常用参数,请参考[Sink常用选项](../common-options/sink-common-options.md)获取更多细节信息。
+接收器插件通用参数,详见 [Sink 通用选项](../common-options/sink-common-options.md)。
-## 示例
+## 任务示例
-thick驱动:
+### 使用 thick 驱动
-```
- Jdbc {
- driver = org.apache.phoenix.jdbc.PhoenixDriver
- url = "jdbc:phoenix:localhost:2182/hbase"
- query = "upsert into test.sink(age, name) values(?, ?)"
+```hocon
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+}
+
+source {
+ FakeSource {
+ row.num = 2
+ schema = {
+ fields {
+ age = int
+ name = string
+ }
}
+ rows = [
+ { kind = INSERT, fields = [10, "jared"] }
+ { kind = INSERT, fields = [20, "huan"] }
+ ]
+ }
+}
+sink {
+ Jdbc {
+ driver = org.apache.phoenix.jdbc.PhoenixDriver
+ url = "jdbc:phoenix:localhost:2182/hbase"
+ query = "upsert into test.sink(age, name) values(?, ?)"
+ }
+}
```
-thin驱动:
+### 使用 thin 驱动
-```
-Jdbc {
+```hocon
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+}
+
+source {
+ FakeSource {
+ row.num = 2
+ schema = {
+ fields {
+ age = int
+ name = string
+ }
+ }
+ rows = [
+ { kind = INSERT, fields = [10, "jared"] }
+ { kind = INSERT, fields = [20, "huan"] }
+ ]
+ }
+}
+
+sink {
+ Jdbc {
driver = org.apache.phoenix.queryserver.client.Driver
url =
"jdbc:phoenix:thin:url=http://spark_e2e_phoenix_sink:8765;serialization=PROTOBUF"
query = "upsert into test.sink(age, name) values(?, ?)"
+ }
}
```
## 变更日志
-<ChangeLog />
+<ChangeLog />
\ No newline at end of file
diff --git a/docs/zh/connectors/sink/Tablestore.md
b/docs/zh/connectors/sink/Tablestore.md
index 1c921672e8..aa1f0b84ff 100644
--- a/docs/zh/connectors/sink/Tablestore.md
+++ b/docs/zh/connectors/sink/Tablestore.md
@@ -4,6 +4,12 @@ import ChangeLog from '../changelog/connector-tablestore.md';
> Tablestore Sink 连接器
+## 支持的引擎
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
## 描述
将 SeaTunnel 数据写入阿里云 Tablestore。
@@ -15,6 +21,16 @@ import ChangeLog from '../changelog/connector-tablestore.md';
- [ ] [支持多表写入](../../introduction/concepts/connector-v2-features.md)
- [ ] [定时刷新](../../introduction/concepts/connector-v2-features.md)
+## 数据类型映射
+
+| SeaTunnel 类型 | Tablestore 普通属性列类型 | Tablestore 主键列类型
|
+|----------------------------------------|---------------------------|-----------------------|
+| `INT`, `TINYINT`, `SMALLINT`, `BIGINT` | `INTEGER` |
`INTEGER` |
+| `FLOAT`, `DOUBLE`, `DECIMAL` | `DOUBLE` |
`STRING` |
+| `STRING`, `DATE`, `TIME`, `TIMESTAMP` | `STRING` |
`STRING` |
+| `BOOLEAN` | `BOOLEAN` |
`STRING` |
+| `BYTES` | `BINARY` |
`BINARY` |
+
## 选项
| 参数名 | 类型 | 是否必填 | 默认值 | 描述 |
@@ -89,16 +105,6 @@ sink {
}
```
-## 类型映射
-
-| SeaTunnel 类型 | Tablestore 普通属性列类型 | Tablestore 主键列类型
|
-|----------------------------------------|---------------------------|-----------------------|
-| `INT`, `TINYINT`, `SMALLINT`, `BIGINT` | `INTEGER` |
`INTEGER` |
-| `FLOAT`, `DOUBLE`, `DECIMAL` | `DOUBLE` |
`STRING` |
-| `STRING`, `DATE`, `TIME`, `TIMESTAMP` | `STRING` |
`STRING` |
-| `BOOLEAN` | `BOOLEAN` |
`STRING` |
-| `BYTES` | `BINARY` |
`BINARY` |
-
## 变更日志
<ChangeLog />
diff --git a/docs/zh/connectors/source/Phoenix.md
b/docs/zh/connectors/source/Phoenix.md
index a21acd6b2c..2d383e3a39 100644
--- a/docs/zh/connectors/source/Phoenix.md
+++ b/docs/zh/connectors/source/Phoenix.md
@@ -4,14 +4,27 @@ import ChangeLog from '../changelog/connector-jdbc.md';
> Phoenix 源连接器
+## 支持的引擎
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
## 描述
-通过[Jdbc连接器] (Jdbc.md) 读取Phoenix数据.
-支持批处理模式和流模式。测试的Phoenix版本是4.xx和5.xx
-在底层实现上,通过Phoenix的jdbc驱动程序,执行upstart语句将数据写入HBase.
-用Java JDBC连接Phoenix的两种方法。一种是通过JDBC连接到zookeeper,另一种是使用JDBC thin 户端连接到
queryserver.
+通过 [Jdbc 连接器](Jdbc.md) 从 Apache Phoenix 读取数据。作业配置中使用的连接器标识符为 `Jdbc`。
+已测试的 Phoenix 版本为 4.x 和 5.x。
+
+底层通过 Phoenix 的 JDBC 驱动执行查询语句并从 HBase 读取行数据。支持标准 `SELECT ...` 语法的
+列投影。
+
+使用 Java JDBC 连接 Phoenix 有两种方式:
+
+- 通过 **thick** 驱动连接 ZooKeeper 集群;
+- 通过 **thin** 驱动连接 Phoenix Query Server。
->
提示:默认情况下,使用(thin)驱动程序jar。如果要使用(thick)驱动程序或Phoenix(thin)驱动程序的其他版本,则需要重新编译jdbc连接器模块
+> **提示:** 默认使用(thin)驱动 jar。如果需要使用(thick)驱动或者其他版本的 Phoenix(thin)
+> 驱动,需要重新编译 `connector-jdbc` 模块。
## 关键特性
@@ -20,47 +33,83 @@ import ChangeLog from '../changelog/connector-jdbc.md';
- [ ] [精确一次](../../introduction/concepts/connector-v2-features.md)
- [x] [列投影](../../introduction/concepts/connector-v2-features.md)
-支持查询SQL,可以实现投影效果.
+支持标准 SQL 查询,可通过投影列裁剪输出字段。
- [ ] [并行度](../../introduction/concepts/connector-v2-features.md)
- [ ] [支持用户自定义分片](../../introduction/concepts/connector-v2-features.md)
## 选项
+| 名称 | 类型 | 是否必填 | 默认值 | 描述
|
+|----------------|--------|----------|--------|-------------------------------------------------------------------------------------------------|
+| driver | String | 是 | - | JDBC 驱动类。thick 驱动使用
`org.apache.phoenix.jdbc.PhoenixDriver`,thin 驱动使用
`org.apache.phoenix.queryserver.client.Driver`。 |
+| url | String | 是 | - | JDBC 连接 URL。thick 驱动使用
`jdbc:phoenix:localhost:2182/hbase`,thin 驱动使用
`jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF`。 |
+| query | String | 是 | - | 读取数据时执行的 SELECT 查询,例如 `select
age, name from test.source`。SELECT 列表的列顺序需要和 `schema.fields` 一致。 |
+| common-options | | 否 | - | 源插件通用参数,详见 [Source
通用选项](../common-options/source-common-options.md)。 |
+
### driver [string]
-如果使用phoenix(thick)驱动程序,则值为`org.apache.phoenix.jdbc.PhoenixDriver`
或您使用的(thin)驱动程序的值是 `org.apache.phoenix.queryserver.client.Driver`
+JDBC 驱动类。thick 驱动使用 `org.apache.phoenix.jdbc.PhoenixDriver`,thin 驱动使用
+`org.apache.phoenix.queryserver.client.Driver`。
### url [string]
-如果您使用phoenix(thick)驱动程序,则值为 `jdbc:phoenix:localhost:2182/hbase`
,或者您使用(thin)驱动程序时,值为
`jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF`
+JDBC 连接 URL。thick 驱动使用 `jdbc:phoenix:localhost:2182/hbase`,thin 驱动使用
+`jdbc:phoenix:thin:url=http://localhost:8765;serialization=PROTOBUF`。
+
+### query [string]
+
+读取数据时执行的 SELECT 查询语句。表名要使用带 schema 的完全限定名(例如 `test.source`),不能只
+写表名。SELECT 列表中按需列出要读取的列即可使用 Phoenix 的列投影能力。
+
### common options
-源插件常用参数,详见 [Source Common Options](../common-options/source-common-options.md)
+源插件通用参数,详见 [Source 通用选项](../common-options/source-common-options.md)。
-## 示例
+## 任务示例
-使用 thick 客户端驱动器
+### 使用 thick 驱动
-```
- Jdbc {
- driver = org.apache.phoenix.jdbc.PhoenixDriver
- url = "jdbc:phoenix:localhost:2182/hbase"
- query = "select age, name from test.source"
- }
+```hocon
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+}
+source {
+ Jdbc {
+ driver = org.apache.phoenix.jdbc.PhoenixDriver
+ url = "jdbc:phoenix:localhost:2182/hbase"
+ query = "select age, name from test.source"
+ }
+}
+
+sink {
+ Console {}
+}
```
-使用 thin 客户端驱动器
+### 使用 thin 驱动
-```
-Jdbc {
+```hocon
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+}
+
+source {
+ Jdbc {
driver = org.apache.phoenix.queryserver.client.Driver
url =
"jdbc:phoenix:thin:url=http://spark_e2e_phoenix_sink:8765;serialization=PROTOBUF"
query = "select age, name from test.source"
+ }
+}
+
+sink {
+ Console {}
}
```
## 变更日志
-<ChangeLog />
+<ChangeLog />
\ No newline at end of file
diff --git a/docs/zh/connectors/source/Tablestore.md
b/docs/zh/connectors/source/Tablestore.md
index 12c28d39fb..9d0f523e80 100644
--- a/docs/zh/connectors/source/Tablestore.md
+++ b/docs/zh/connectors/source/Tablestore.md
@@ -4,6 +4,12 @@ import ChangeLog from '../changelog/connector-tablestore.md';
> Tablestore 源连接器
+## 支持的引擎
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
## 描述
从阿里云 Tablestore 读取全量和增量数据。该连接器使用 Tablestore Tunnel 的 `BaseAndStream`
模式,先读取已有数据,再继续消费后续变更。
diff --git a/docs/zh/connectors/source/Zendesk.md
b/docs/zh/connectors/source/Zendesk.md
index 963c4f1b57..c553804016 100644
--- a/docs/zh/connectors/source/Zendesk.md
+++ b/docs/zh/connectors/source/Zendesk.md
@@ -4,9 +4,20 @@ import ChangeLog from '../changelog/connector-http-zendesk.md';
> Zendesk 数据源连接器
+## 支持的引擎
+
+> Spark<br/>
+> Flink<br/>
+> SeaTunnel Zeta<br/>
+
## 描述
-用于从 [Zendesk REST API](https://developer.zendesk.com/api-reference/) 读取数据。它使用
Zendesk 账号邮箱和 API token 进行认证(以 HTTP Basic `Authorization` 请求头发送),并将某个 Zendesk
接口(如 tickets、users、organizations)读取为 SeaTunnel 的行数据。
+用于从 [Zendesk REST API](https://developer.zendesk.com/api-reference/) 读取数据。它使用
Zendesk
+账号邮箱和 API token 进行认证(以 HTTP Basic `Authorization` 请求头发送),并将某个 Zendesk 接口
+(如 tickets、users、organizations)读取为 SeaTunnel 的行数据。
+
+该连接器基于 [Http source](Http.md) 实现,继承了大部分选项。区别主要在于认证选项以及 `format`
+的默认值。
## 主要特性
@@ -19,24 +30,24 @@ import ChangeLog from
'../changelog/connector-http-zendesk.md';
## 选项
-| 名称 | 类型 | 是否必填 | 默认值 |
-|-----------------------------|---------|----------|-----------|
-| url | String | 是 | - |
-| email | String | 是 | - |
-| api_token | String | 是 | - |
-| method | String | 否 | get |
-| schema | Config | 否 | - |
-| format | String | 否 | text |
-| params | Map | 否 | - |
-| body | String | 否 | - |
-| json_field | Config | 否 | - |
-| content_field | String | 否 | - |
-| poll_interval_millis | int | 否 | - |
-| retry | int | 否 | - |
-| retry_backoff_multiplier_ms | int | 否 | 100 |
-| retry_backoff_max_ms | int | 否 | 10000 |
-| enable_multi_lines | boolean | 否 | false |
-| common-options | config | 否 | - |
+| 名称 | 类型 | 是否必填 | 默认值 | 描述
|
+|-----------------------------|---------|----------|-----------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
+| url | String | 是 | - | 要读取的 Zendesk
REST API 接口地址,例如 `https://your-subdomain.zendesk.com/api/v2/tickets.json`。
|
+| email | String | 是 | - | 用于 API token
认证的 Zendesk 账号邮箱。它会与 `api_token` 组合为 `{email}/token:{api_token}` 并以 HTTP Basic
`Authorization` 请求头发送。 |
+| api_token | String | 是 | - | Zendesk API
token。获取方式请参考 [Zendesk API token
文档](https://support.zendesk.com/hc/en-us/articles/4408889192858)。
|
+| method | String | 否 | get | HTTP 请求方法,仅支持
`GET` 和 `POST`。
|
+| schema | Config | 否 | - |
数据的结构,包括字段名称和字段类型。更多详情请参考 [Schema
Feature](../../introduction/concepts/schema-feature.md)。
|
+| format | String | 否 | text | 上游数据的格式,目前仅支持
`json` 和 `text`,默认 `text`。Zendesk 接口始终返回 JSON,因此通常需要把 `format` 设为 `json`,并配合
`content_field` 把真正的结果数组抽取出来再映射成行。 |
+| params | Map | 否 | - | 附加到请求 URL
的查询参数,可用于过滤、分页等场景。
|
+| body | String | 否 | - | `POST`(或支持
body 的方法)请求体。当 `format = "json"` 时,body 必须是合法的 JSON。
|
+| json_field | Config | 否 | - | 该参数用于配置
schema,因此必须与 `schema` 一起使用。它将响应中的 JSON 路径映射到 schema 字段。详情和示例请参考 [Http
source](./Http.md) 连接器。 |
+| content_field | String | 否 | - |
该参数可以在映射为行之前,提取 JSON 响应中的某个子部分(例如顶层键 `tickets` 或 `users` 下的数组)。读取
`/api/v2/tickets.json` 时通常设置为 `content_field = "$.tickets.*"`。 |
+| poll_interval_millis | int | 否 | - |
流模式下两次连续请求之间的间隔,单位毫秒。批模式下无效。
|
+| retry | int | 否 | - | HTTP 请求抛出
`IOException` 时的最大重试次数。
|
+| retry_backoff_multiplier_ms | int | 否 | 100 | 重试退避倍数,单位毫秒。
|
+| retry_backoff_max_ms | int | 否 | 10000 | 最大重试退避时间,单位毫秒。
|
+| enable_multi_lines | boolean | 否 | false |
是否把响应解析为按换行分隔的多段 JSON。仅在 `format = "json"` 时生效。
|
+| common-options | config | 否 | - |
数据源插件通用参数,详情请参考 [Source Common
Options](../common-options/source-common-options.md)。
|
### url [String]
@@ -44,7 +55,8 @@ import ChangeLog from
'../changelog/connector-http-zendesk.md';
### email [String]
-用于 API token 认证的 Zendesk 账号邮箱。它会与 `api_token` 组合为 `{email}/token:{api_token}`
并以 HTTP Basic `Authorization` 请求头发送。
+用于 API token 认证的 Zendesk 账号邮箱。它会与 `api_token` 组合为 `{email}/token:{api_token}`
并以
+HTTP Basic `Authorization` 请求头发送。
### api_token [String]
@@ -52,7 +64,8 @@ Zendesk API token。获取方式请参考 [Zendesk API token 文档](https://sup
### method [String]
-http 请求方法,仅支持 GET、POST 方法。
+HTTP 请求方法,仅支持 `GET` 和 `POST`。`POST` 一般需要配合 `body`,用于 Zendesk 上接受请求体做查询
+或分页的接口。
### schema [Config]
@@ -60,27 +73,63 @@ http 请求方法,仅支持 GET、POST 方法。
### format [String]
-上游数据的格式,目前仅支持 `json` 和 `text`,默认 `text`。
+上游数据的格式,目前仅支持 `json` 和 `text`,默认 `text`。Zendesk 接口始终返回 JSON,因此需要把
+`format` 设为 `json`,并配合 `content_field` 抽取结果数组。
### params [Map]
-http 请求参数。
+附加到请求 URL 的查询参数,用于过滤、分页等场景。
+
+### body [String]
+
+`POST`(或支持 body 的方法)请求体。当 `format = "json"` 时,body 必须是合法的 JSON。
### json_field [Config]
-该参数用于配置 schema,因此必须与 schema 一起使用。它将响应中的 JSON 路径映射到 schema 字段。详情和示例请参考 [Http
source](./Http.md) 连接器。
+该参数用于配置 schema,因此必须与 `schema` 一起使用。它将响应中的 JSON 路径映射到 schema 字段。
+详情和示例请参考 [Http source](./Http.md) 连接器。
### content_field [String]
-该参数可以在映射为行之前,提取 JSON 响应中的某个子部分(例如顶层键 `tickets` 或 `users` 下的数组)。详情和示例请参考 [Http
source](./Http.md) 连接器。
+该参数可以在映射为行之前,提取 JSON 响应中的某个子部分(例如顶层键 `tickets` 或 `users` 下的
+数组)。读取 `/api/v2/tickets.json` 时通常设置为 `content_field = "$.tickets.*"`。详情和示例请
+参考 [Http source](./Http.md) 连接器。
+
+### poll_interval_millis [int]
+
+流模式下两次连续请求之间的间隔,单位毫秒。批模式下无效。
+
+### retry [int]
+
+HTTP 请求抛出 `IOException` 时的最大重试次数。重试间隔由 `retry_backoff_multiplier_ms` 和
+`retry_backoff_max_ms` 共同决定。
+
+### retry_backoff_multiplier_ms [int]
+
+重试退避的基础单位,单位毫秒。重试之间的等待时间会在多次重试中逐渐增长,上限为
+`retry_backoff_max_ms`。增长曲线并不是每次固定的倍数关系,具体的斐波那契策略请参考
+`HttpClientProvider`(位于 `connector-http-base`)。
+
+### retry_backoff_max_ms [int]
+
+最大重试退避时间,单位毫秒。
+
+### enable_multi_lines [boolean]
+
+是否把响应解析为按换行分隔的多段 JSON。仅在 `format = "json"` 时生效。
### common options
数据源插件通用参数,详情请参考 [Source Common
Options](../common-options/source-common-options.md)。
-## 示例
+## 任务示例
```hocon
+env {
+ parallelism = 1
+ job.mode = "BATCH"
+}
+
source {
Zendesk {
url = "https://your-subdomain.zendesk.com/api/v2/tickets.json"
@@ -101,6 +150,10 @@ source {
}
}
}
+
+sink {
+ Console {}
+}
```
## 变更日志