This is an automated email from the ASF dual-hosted git repository. github-merge-queue[bot] pushed a commit to branch gh-readonly-queue/dev/pr-12679-72e71f8c1e5b2c76939216b674601aab5a378168 in repository https://gitbox.apache.org/repos/asf/seatunnel.git
commit a7955d6355a7d7536f8f672db98ef2b8dec114a2 Author: Jast <[email protected]> AuthorDate: Sat Nov 7 06:37:40 2026 +0000 [Docs] Fix connector doc inaccuracies and en/zh parity verified against source code (#12679) Co-authored-by: zhangshenghang <[email protected]> Co-authored-by: jast <[email protected]> --- docs/en/connectors/sink/Airtable.md | 1 + docs/en/connectors/sink/Elasticsearch.md | 3 ++- docs/en/connectors/sink/Greenplum.md | 24 +++++++++++++++++++++ docs/en/connectors/sink/Vertica.md | 4 ++-- docs/en/connectors/source/Airtable.md | 4 ++++ docs/en/connectors/source/InfluxDB.md | 11 ++++++---- docs/en/connectors/source/OneSignal.md | 5 +++++ docs/en/connectors/source/Vertica.md | 2 +- docs/zh/connectors/sink/Airtable.md | 1 + docs/zh/connectors/sink/Greenplum.md | 29 ++++++++++++++----------- docs/zh/connectors/sink/InfluxDB.md | 36 ++++++++++++++++++++++++++++++++ docs/zh/connectors/sink/Vertica.md | 2 +- docs/zh/connectors/source/Airtable.md | 4 ++++ docs/zh/connectors/source/OneSignal.md | 4 ++++ docs/zh/connectors/source/Vertica.md | 2 +- 15 files changed, 110 insertions(+), 22 deletions(-) diff --git a/docs/en/connectors/sink/Airtable.md b/docs/en/connectors/sink/Airtable.md index c57d64a42b1..db1eec58a04 100644 --- a/docs/en/connectors/sink/Airtable.md +++ b/docs/en/connectors/sink/Airtable.md @@ -28,6 +28,7 @@ Used to write data to Airtable. | request_interval_ms | int | No | 220 | Minimum interval in milliseconds between API requests. Default 220ms (to stay within Airtable's 5 requests/second limit). Must be `>= 0`. | | rate_limit_backoff_ms | int | No | 30000 | Base backoff time in milliseconds when receiving a 429 (rate limit) response. Default 30000ms. Must be `>= 0`. | | rate_limit_max_retries | int | No | 3 | Maximum number of retries after receiving a 429 response. Default 3. Must be `>= 0`. | +| multi_table_sink_replica | int | No | 1 | Number of sink writer replicas for each table in a multi-table job. | | common-options | | No | - | Sink common options. See [Sink Common Options](../common-options/sink-common-options.md). | ## Usage Notes diff --git a/docs/en/connectors/sink/Elasticsearch.md b/docs/en/connectors/sink/Elasticsearch.md index 93e96191d88..1087d34578b 100644 --- a/docs/en/connectors/sink/Elasticsearch.md +++ b/docs/en/connectors/sink/Elasticsearch.md @@ -389,7 +389,8 @@ CDC collection supports a limited number of schema changes. The currently suppor * Adding columns. -### Schema Evolution +Example: + ```hocon env { # You can set engine configuration here diff --git a/docs/en/connectors/sink/Greenplum.md b/docs/en/connectors/sink/Greenplum.md index f1ee83e08d9..2389aa5bd4e 100644 --- a/docs/en/connectors/sink/Greenplum.md +++ b/docs/en/connectors/sink/Greenplum.md @@ -46,6 +46,30 @@ Greenplum sink does not support exactly-once semantics because XA transaction is | Greenplum by PostgreSQL driver | `org.postgresql.Driver` | `jdbc:postgresql://localhost:5432/testdb` | [Download](https://mvnrepository.com/artifact/org.postgresql/postgresql) | | Greenplum native driver | `com.pivotal.jdbc.GreenplumDriver` | `jdbc:pivotal:greenplum://localhost:5432;DatabaseName=testdb` | Download from Greenplum | +## Data Type Mapping + +Greenplum reuses the PostgreSQL JDBC driver mapping. The table below lists the commonly used types: + +| SeaTunnel Data Type | Greenplum Data Type | +|---------------------|---------------------| +| BOOLEAN | BOOLEAN | +| TINYINT / SMALLINT | SMALLINT | +| INT | INTEGER | +| BIGINT | BIGINT | +| FLOAT | REAL | +| DOUBLE | DOUBLE PRECISION | +| DECIMAL(p, s) | NUMERIC(p, s) | +| STRING | TEXT (VARCHAR(n) when a column length is set) | +| DATE | DATE | +| TIME | TIME(p) | +| TIMESTAMP | TIMESTAMP(p) | +| TIMESTAMP_TZ | TIMESTAMPTZ(p) | +| BYTES | BYTEA | + +The table above lists the sink direction (`PostgresTypeConverter.reconvert`). A `DECIMAL` column is +written as `NUMERIC(p, s)`; the `MONEY` type is only produced when the column's source type was +already `money`, so a plain `DECIMAL(30,2)` column lands as `NUMERIC(30,2)`, not `MONEY`. + ## Options Only Greenplum-specific commonly used options are listed here. Other JDBC sink options, such as `batch_size`, `max_retries`, `generate_sink_sql`, `database`, `table`, `primary_keys`, and `properties`, are inherited from [Jdbc Sink](Jdbc.md). diff --git a/docs/en/connectors/sink/Vertica.md b/docs/en/connectors/sink/Vertica.md index 373130e33fd..c83593ba52d 100644 --- a/docs/en/connectors/sink/Vertica.md +++ b/docs/en/connectors/sink/Vertica.md @@ -12,8 +12,8 @@ import ChangeLog from '../changelog/connector-jdbc.md'; ## Description -Write data through jdbc. Support Batch mode and Streaming mode, support concurrent writing, support exactly-once -semantics (using XA transaction guarantee). +Write data through jdbc. Support Batch mode and Streaming mode, support concurrent writing. Exactly-once +semantics (XA transaction guarantee) is not supported because Vertica has no JDBC XA data source. ## Using Dependency diff --git a/docs/en/connectors/source/Airtable.md b/docs/en/connectors/source/Airtable.md index 838f8dabc3c..27310def3ce 100644 --- a/docs/en/connectors/source/Airtable.md +++ b/docs/en/connectors/source/Airtable.md @@ -52,6 +52,10 @@ Used to read data from Airtable. | enable_multi_lines | boolean | No | false | When `true`, multiple JSON objects separated by newlines in the response body are treated as separate records. | | connect_timeout_ms | int | No | 12000 | HTTP connection timeout in milliseconds. Default 12000ms. | | socket_timeout_ms | int | No | 60000 | HTTP socket timeout in milliseconds. Default 60000ms. | +| retry | int | No | - | Maximum retry count when the 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. | +| poll_interval_millis | int | No | - | Request interval in milliseconds for streaming jobs. | | common-options | config | No | - | Source plugin common parameters. See [Source Common Options](../common-options/source-common-options.md). | ## Usage Notes diff --git a/docs/en/connectors/source/InfluxDB.md b/docs/en/connectors/source/InfluxDB.md index 45f4b29b640..6e5fbbd0c5f 100644 --- a/docs/en/connectors/source/InfluxDB.md +++ b/docs/en/connectors/source/InfluxDB.md @@ -174,10 +174,13 @@ the query results overlap. :::caution Reserved option -The current split logic reads the lowercase `where` keyword directly from the `sql` option. -Setting `where` has no effect on the generated split queries — put the filter inside `sql` -instead, for example `select * from test where age > 0`. The split parser is case-sensitive on -the `where` keyword. +Single-table mode (root-level `sql`): setting `where` has no effect on the generated split +queries — put the filter inside `sql` instead, for example `select * from test where age > 0`. +That split parser is case-sensitive on the `where` keyword. + +`tables_configs` multi-table mode: setting `where` in a table entry fails at build time with an +`OptionValidationException` (`InfluxDBSourceFactory` rejects it); that split parser is +case-insensitive on the `where` keyword. This option is kept in the option list only because the validation rule (`InfluxDBSourceFactory.optionRule()`) still references it for backward compatibility; the diff --git a/docs/en/connectors/source/OneSignal.md b/docs/en/connectors/source/OneSignal.md index fe1912b706a..f40c1cbfe23 100644 --- a/docs/en/connectors/source/OneSignal.md +++ b/docs/en/connectors/source/OneSignal.md @@ -128,6 +128,11 @@ source { } ``` +> Note: the HTTP source `pageing` option advances the page index by exactly 1 per request, so it +cannot express a stride. OneSignal's `offset` is a record offset, not a page number — combining it +with `pageing` would request overlapping windows (offsets 0, 1, 2, ...), which is why the example +above issues a single request instead. + ### Extract Fields With JSONPath Use `json_field` when each output field lives at a different JSON path: diff --git a/docs/en/connectors/source/Vertica.md b/docs/en/connectors/source/Vertica.md index 04e4cc65e60..43322611e07 100644 --- a/docs/en/connectors/source/Vertica.md +++ b/docs/en/connectors/source/Vertica.md @@ -47,7 +47,7 @@ Read external data source data through JDBC. |-----------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------| | BIT | BOOLEAN | | TINYINT<br/>TINYINT UNSIGNED<br/>SMALLINT<br/>SMALLINT UNSIGNED<br/>MEDIUMINT<br/>MEDIUMINT UNSIGNED<br/>INT<br/>INTEGER<br/>YEAR | INT | -| INT UNSIGNED<br/>INTEGER UNSIGNED<br/>BIGINT | LONG | +| INT UNSIGNED<br/>INTEGER UNSIGNED<br/>BIGINT | BIGINT | | BIGINT UNSIGNED | DECIMAL(20,0) | | DECIMAL(x,y)(Get the designated column's specified column size.<38) | DECIMAL(x,y) | | DECIMAL(x,y)(Get the designated column's specified column size.>38) | DECIMAL(38,18) | diff --git a/docs/zh/connectors/sink/Airtable.md b/docs/zh/connectors/sink/Airtable.md index 25984435cb9..9c6381fabed 100644 --- a/docs/zh/connectors/sink/Airtable.md +++ b/docs/zh/connectors/sink/Airtable.md @@ -28,6 +28,7 @@ import ChangeLog from '../changelog/connector-http-airtable.md'; | request_interval_ms | int | 否 | 220 | API 请求之间的最小间隔(毫秒),默认 220ms(以保持在 Airtable 每秒 5 次请求的限制内),必须 `>= 0`。 | | rate_limit_backoff_ms | int | 否 | 30000 | 收到 429(限流)响应时的基础退避时间(毫秒),默认 30000ms,必须 `>= 0`。 | | rate_limit_max_retries | int | 否 | 3 | 收到 429 响应后的最大重试次数,默认 3,必须 `>= 0`。 | +| multi_table_sink_replica | int | 否 | 1 | 多表任务中每张表的 sink writer 副本数。 | | common-options | | 否 | - | Sink 插件通用参数,详见 [Sink Common Options](../common-options/sink-common-options.md)。 | ## 使用提示 diff --git a/docs/zh/connectors/sink/Greenplum.md b/docs/zh/connectors/sink/Greenplum.md index 49569d83dab..f943a350ae2 100644 --- a/docs/zh/connectors/sink/Greenplum.md +++ b/docs/zh/connectors/sink/Greenplum.md @@ -50,20 +50,25 @@ Greenplum Sink 不支持精确一次语义,因为 Greenplum 不支持 XA 事 Greenplum 沿用 PostgreSQL JDBC 驱动映射。下表列出常用类型对照: -| Greenplum 数据类型 | SeaTunnel 数据类型 | -|--------------------|--------------------| +| SeaTunnel 数据类型 | Greenplum 数据类型 | +|---------------------|---------------------| | BOOLEAN | BOOLEAN | -| SMALLINT / INT2 | SMALLINT | -| INT / INT4 / SERIAL | INT | -| BIGINT / INT8 / BIGSERIAL | BIGINT | -| NUMERIC(p, s) / DECIMAL(p, s) / MONEY | DECIMAL(p, s) | -| REAL / FLOAT4 | FLOAT | -| DOUBLE PRECISION / FLOAT8 | DOUBLE | -| CHAR / VARCHAR / TEXT / JSON / JSONB | STRING | +| TINYINT / SMALLINT | SMALLINT | +| INT | INTEGER | +| BIGINT | BIGINT | +| FLOAT | REAL | +| DOUBLE | DOUBLE PRECISION | +| DECIMAL(p, s) | NUMERIC(p, s) | +| STRING | TEXT(指定列长度时为 VARCHAR(n)) | | DATE | DATE | -| TIME | TIME | -| TIMESTAMP / TIMESTAMPTZ | TIMESTAMP | -| BYTEA | BYTES | +| TIME | TIME(p) | +| TIMESTAMP | TIMESTAMP(p) | +| TIMESTAMP_TZ | TIMESTAMPTZ(p) | +| BYTES | BYTEA | + +上表为 Sink 写入方向(`PostgresTypeConverter.reconvert`)。`DECIMAL` 列会写为 `NUMERIC(p, s)`; +只有当列的源类型本来就是 `money` 时才会生成 `MONEY` 类型,因此普通的 `DECIMAL(30,2)` 列落地为 +`NUMERIC(30,2)` 而不是 `MONEY`。 ## 选项 diff --git a/docs/zh/connectors/sink/InfluxDB.md b/docs/zh/connectors/sink/InfluxDB.md index 3debf08cc33..a7b0f0dc290 100644 --- a/docs/zh/connectors/sink/InfluxDB.md +++ b/docs/zh/connectors/sink/InfluxDB.md @@ -237,6 +237,42 @@ sink { } ``` +### 每个 Measurement 独立写入并使用多副本 Writer + +当上游表数量很大时,可以通过 `multi_table_sink_replica` 把多表写入分散到更多的 writer 实例上。 + +```hocon +env { + parallelism = 2 + job.mode = "STREAMING" + checkpoint.interval = 10000 +} + +source { + Mysql-CDC { + url = "jdbc:mysql://127.0.0.1:3306/seatunnel" + username = "root" + password = "******" + table-names = ["seatunnel.role", "seatunnel.user", "galileo.Bucket"] + } +} + +sink { + InfluxDB { + url = "http://influxdb-host:8086" + database = "test" + key_time = "time" + key_tags = ["label"] + batch_size = 2048 + max_retries = 3 + retry_backoff_multiplier_ms = 100 + max_retry_backoff_ms = 5000 + write_timeout = 10 + multi_table_sink_replica = 2 + } +} +``` + ## 变更日志 <ChangeLog /> diff --git a/docs/zh/connectors/sink/Vertica.md b/docs/zh/connectors/sink/Vertica.md index 5eee4346094..6f39feb04eb 100644 --- a/docs/zh/connectors/sink/Vertica.md +++ b/docs/zh/connectors/sink/Vertica.md @@ -12,7 +12,7 @@ import ChangeLog from '../changelog/connector-jdbc.md'; ## 描述 -通过 JDBC 写入数据。支持批处理和流处理模式,支持并发写入,支持精确一次语义(使用 XA 事务保证)。 +通过 JDBC 写入数据。支持批处理和流处理模式,支持并发写入。由于 Vertica 没有提供 JDBC XA 数据源,不支持精确一次语义(XA 事务保证)。 ## 使用依赖 diff --git a/docs/zh/connectors/source/Airtable.md b/docs/zh/connectors/source/Airtable.md index 04bf79456db..53e4234bb5d 100644 --- a/docs/zh/connectors/source/Airtable.md +++ b/docs/zh/connectors/source/Airtable.md @@ -52,6 +52,10 @@ import ChangeLog from '../changelog/connector-http-airtable.md'; | enable_multi_lines | boolean | 否 | false | 是否启用多行模式,将响应体中按换行分隔的多个 JSON 对象视为独立记录。 | | connect_timeout_ms | int | 否 | 12000 | HTTP 连接超时时间(毫秒),默认 12000ms。 | | socket_timeout_ms | int | 否 | 60000 | HTTP 套接字超时时间(毫秒),默认 60000ms。 | +| retry | int | 否 | - | 请求抛出 `IOException` 时的最大重试次数。 | +| retry_backoff_multiplier_ms | int | 否 | 100 | 请求失败时的重试退避时间倍数(毫秒)。 | +| retry_backoff_max_ms | int | 否 | 10000 | 最大重试退避时间(毫秒)。 | +| poll_interval_millis | int | 否 | - | 流式模式下请求 API 的时间间隔(毫秒)。 | | common-options | config | 否 | - | 源插件通用参数,详见 [源通用选项](../common-options/source-common-options.md)。 | ## 使用提示 diff --git a/docs/zh/connectors/source/OneSignal.md b/docs/zh/connectors/source/OneSignal.md index 61e2aa3a8e9..96d746c810d 100644 --- a/docs/zh/connectors/source/OneSignal.md +++ b/docs/zh/connectors/source/OneSignal.md @@ -126,6 +126,10 @@ source { } ``` +> 注意:HTTP source 的 `pageing` 选项每次请求只会把页码加 1,无法表达步长。OneSignal 的 `offset` +是记录偏移量而不是页码——与 `pageing` 组合会请求到相互重叠的窗口(offset 0、1、2……),因此上面的示例 +改为单次请求。 + ### 通过 JSONPath 抽取字段 当不同字段位于不同 JSON 路径时,使用 `json_field`: diff --git a/docs/zh/connectors/source/Vertica.md b/docs/zh/connectors/source/Vertica.md index da9847fc2ae..8249fa24032 100644 --- a/docs/zh/connectors/source/Vertica.md +++ b/docs/zh/connectors/source/Vertica.md @@ -47,7 +47,7 @@ import ChangeLog from '../changelog/connector-jdbc.md'; |-----------------|------------------| | BIT | BOOLEAN | | TINYINT<br/>TINYINT UNSIGNED<br/>SMALLINT<br/>SMALLINT UNSIGNED<br/>MEDIUMINT<br/>MEDIUMINT UNSIGNED<br/>INT<br/>INTEGER<br/>YEAR | INT | -| INT UNSIGNED<br/>INTEGER UNSIGNED<br/>BIGINT | LONG | +| INT UNSIGNED<br/>INTEGER UNSIGNED<br/>BIGINT | BIGINT | | BIGINT UNSIGNED | DECIMAL(20,0) | | DECIMAL(x,y)(<38) | DECIMAL(x,y) | | DECIMAL(x,y)(>38) | DECIMAL(38,18) |
