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-12813-528a9fed6eb449d7a07c7beb44e6dc7862ac600b in repository https://gitbox.apache.org/repos/asf/seatunnel.git
commit 625779fdeb885105bed931f71f8d6b67ab115e86 Author: Jast <[email protected]> AuthorDate: Wed Nov 25 12:13:08 2026 +0000 [Docs] Fix connector and CDC doc inaccuracies verified against source code (#12813) Co-authored-by: zhangshenghang <[email protected]> Co-authored-by: jast <[email protected]> Co-authored-by: multica-agent <[email protected]> Co-authored-by: davidzollo <[email protected]> --- docs/en/connectors/sink/Sls.md | 1 + docs/en/connectors/sink/Snowflake.md | 3 +++ docs/en/connectors/source/DB2-CDC.md | 1 + docs/en/connectors/source/Redis.md | 22 +++++++++++++++------- docs/en/connectors/source/Snowflake.md | 2 +- docs/en/connectors/source/SqlServer-CDC.md | 17 +++++++++++------ docs/en/connectors/source/TDengine.md | 22 ++++++++++++---------- docs/en/connectors/source/TiDB-CDC.md | 1 + docs/en/connectors/source/Vitess-CDC.md | 2 ++ docs/zh/connectors/sink/Sls.md | 1 + docs/zh/connectors/sink/Snowflake.md | 5 ++++- docs/zh/connectors/source/DB2-CDC.md | 1 + docs/zh/connectors/source/Milvus.md | 2 +- docs/zh/connectors/source/Redis.md | 8 ++++---- docs/zh/connectors/source/Snowflake.md | 2 +- docs/zh/connectors/source/SqlServer-CDC.md | 18 +++++++++++------- docs/zh/connectors/source/TDengine.md | 6 +++--- docs/zh/connectors/source/TiDB-CDC.md | 1 + docs/zh/connectors/source/Vitess-CDC.md | 2 ++ 19 files changed, 76 insertions(+), 41 deletions(-) diff --git a/docs/en/connectors/sink/Sls.md b/docs/en/connectors/sink/Sls.md index 77bc18be18..db2244558b 100644 --- a/docs/en/connectors/sink/Sls.md +++ b/docs/en/connectors/sink/Sls.md @@ -41,6 +41,7 @@ Maven central repository. | access_key_secret | String | Yes | - | Alibaba Cloud AccessKey secret. Must not be empty or whitespace-only. | | source | String | No | `SeaTunnel-Source` | Source tag written to SLS log groups. | | topic | String | No | `SeaTunnel-Topic` | Topic tag written to SLS log groups. | +| log_group_size | Int | No | 100 | SLS log group write size. Reserved: the connector reads this option, but the current implementation sends one log group per record, so it has no effect yet. | ## Notes diff --git a/docs/en/connectors/sink/Snowflake.md b/docs/en/connectors/sink/Snowflake.md index f954781189..1c56b10606 100644 --- a/docs/en/connectors/sink/Snowflake.md +++ b/docs/en/connectors/sink/Snowflake.md @@ -54,6 +54,8 @@ Write data to Snowflake through JDBC. The sink supports batch and streaming jobs | BINARY<br/>VARBINARY | BYTES | | GEOGRAPHY<br/>GEOMETRY | STRING | +When the sink creates a table, a SeaTunnel `DECIMAL(p, s)` column with `p > 38` is reduced to precision 38, with the scale reduced by the same overflow. SeaTunnel `BYTES` columns are created as Snowflake `GEOMETRY`. + ## Sink Options | Name | Type | Required | Default | Description | @@ -64,6 +66,7 @@ Write data to Snowflake through JDBC. The sink supports batch and streaming jobs | username | String | No | - | Username for the Snowflake account. | | password | String | No | - | Password for the Snowflake account. | | query | String | No | - | SQL used to write upstream rows. Takes precedence over `database`/`table` auto-generated SQL, and disables catalog-based optimizations (no auto-generated upsert). | +| generate_sink_sql | Boolean | No | false | Whether to generate sink SQL from `database`, `table` and `primary_keys` instead of using `query`. | | database | String | No | - | Database name. When `generate_sink_sql = true`, used with `table` to generate `INSERT`/upsert SQL. Mutually exclusive with `query`; when both are set, `query` wins. | | table | String | No | - | Target table name. Used together with `database` and `generate_sink_sql` to generate writes. | | primary_keys | Array | No | - | Primary-key columns. Required when `generate_sink_sql = true` together with `enable_upsert = true` to build an upsert (insert-or-update) statement. | diff --git a/docs/en/connectors/source/DB2-CDC.md b/docs/en/connectors/source/DB2-CDC.md index 09cec0711c..09653e8241 100644 --- a/docs/en/connectors/source/DB2-CDC.md +++ b/docs/en/connectors/source/DB2-CDC.md @@ -88,6 +88,7 @@ UPDATE and DELETE changes after the initial snapshot is finished. | chunk-key.even-distribution.factor.upper-bound | Double | No | 100 | The upper bound used to decide whether a split key is evenly distributed. | | chunk-key.even-distribution.factor.lower-bound | Double | No | 0.05 | The lower bound used to decide whether a split key is evenly distributed. | | sample-sharding.threshold | int | No | 1000 | The estimated shard count threshold that triggers sample-based sharding for unevenly distributed split keys. | +| split.allow-sampling | Boolean | No | true | Whether to allow the sample-based sharding strategy. When set to `false`, sample-based sharding is disabled: evenly distributed split keys still use arithmetic splitting, and unevenly distributed split keys fall back to iterative queries. | | inverse-sampling.rate | int | No | 1000 | The inverse sampling rate used by sample-based sharding. | | exactly_once | Boolean | No | false | Enable exactly-once semantics for initial snapshot handoff. | | debezium.* | config | No | - | Pass-through Debezium DB2 connector properties. | diff --git a/docs/en/connectors/source/Redis.md b/docs/en/connectors/source/Redis.md index da6fd95fc7..0c23ddf9b8 100644 --- a/docs/en/connectors/source/Redis.md +++ b/docs/en/connectors/source/Redis.md @@ -83,7 +83,7 @@ When using `tables_configs` to read multiple key patterns, each table configurat | hash_key_parse_mode | string | no | all | Hash key parse mode: `all` or `kv` | | read_key_enabled | boolean| no | false | Include Redis key in output | | key_field_name | string | no | - | Field name for Redis key | -| single_field_name | string | no | - | Field name for single-value types | +| single_field_name | string | yes for single-value types (string, list, set, zset) when read_key_enabled = true | - | Field name for the Redis value | | field_delimiter | string | no | ',' | Delimiter for text format | **Note:** When this configuration corresponds to a single table, configure these table-level options at the outer layer instead of using `tables_configs`. For example, put `keys`, `data_type`, `format`, and `schema` directly under `Redis`. @@ -176,8 +176,12 @@ When set to `true`, both the key and its associated value are included in the re By default (`false`), only the value is read and included. -If you are using a single-value Redis data type (such as `string`, `list`, `set`, or `zset`) with `read_key_enabled = true`, -you must specify `single_field_name` to map the value to a schema column. `key_field_name` is optional and defaults to `key`. +If you set `read_key_enabled = true` in a single-table configuration, you must +also specify `single_field_name`, regardless of the data type. For single-value +Redis data types (such as `string`, `list`, `set`, or `zset`) it maps the value +to a schema column, and reading fails without it. `key_field_name` is optional +and defaults to `key`. Entries of `tables_configs` are not affected by this +validation: there `single_field_name` is only needed for single-value types. When you configure a schema, include the actual output field names, including the default `key` field or the name set by `key_field_name`. @@ -357,11 +361,15 @@ The schema fields of redis data. For more details, please refer to [Schema Featu ### single_field_name [string] -Specifies the field name for Redis values when `read_key_enabled = true` and the value is a single primitive (e.g., `string`, `int`). +Specifies the field name for Redis values when `read_key_enabled = true`. In a +single-table configuration this option is required whenever +`read_key_enabled = true`, no matter which `data_type` is configured. For single +primitive values (e.g., `string`, `int`) it names the schema column the value is +mapped to, and reading fails without it. -This name is used in the schema to map the value field. - -**Note:** This option has no effect when reading complex Redis data types such as hashes or objects that can be directly mapped to a schema. +**Note:** For complex Redis data types such as hashes, the value fields come +from the hash structure and the option is only enforced by the single-table +configuration validation described above. Example : ```hocon diff --git a/docs/en/connectors/source/Snowflake.md b/docs/en/connectors/source/Snowflake.md index 0735738126..1b338f8163 100644 --- a/docs/en/connectors/source/Snowflake.md +++ b/docs/en/connectors/source/Snowflake.md @@ -150,7 +150,7 @@ source { - Use the `Jdbc` plugin name for Snowflake jobs and set `driver = "net.snowflake.client.jdbc.SnowflakeDriver"`. - Place the Snowflake JDBC driver jar in `$SEATUNNEL_HOME/plugins/jdbc/lib/` before running the job. - When reading in parallel, `partition_column`, `partition_lower_bound`, `partition_upper_bound`, and `partition_num` must describe the same numeric column range. -- Snowflake geospatial columns are mapped to the SeaTunnel `STRING` type. +- Snowflake `GEOGRAPHY`/`GEOMETRY` columns are always mapped to the SeaTunnel `STRING` type; the returned text representation depends on Snowflake JDBC URL parameters such as `GEOGRAPHY_OUTPUT_FORMAT`. ## Changelog diff --git a/docs/en/connectors/source/SqlServer-CDC.md b/docs/en/connectors/source/SqlServer-CDC.md index d246d875a1..16444dc939 100644 --- a/docs/en/connectors/source/SqlServer-CDC.md +++ b/docs/en/connectors/source/SqlServer-CDC.md @@ -82,8 +82,8 @@ case-sensitive databases, make sure the configured identifier case matches the d | username | String | Yes | - | Username to use when connecting to the SQL Server instance. [...] | password | String | Yes | - | Password to use when connecting to the database server. [...] | database-names | List | Yes | - | Database name of the database to monitor. [...] -| table-names | List | Yes | - | Tables to monitor. Use the full table identifier: `databaseName.schemaName.tableName`. This option is mutually exclusive with `table-pattern`. [...] -| table-pattern | String | Yes | - | Regular expression for tables to monitor. Use the full table identifier in the pattern, for example `column_type_test\\.dbo\\..*`. This option is mutually exclusive with `table-names`. [...] +| table-names | List | Yes, if `table-pattern` is not set | - | Tables to monitor. Use the full table identifier: `databaseName.schemaName.tableName`. This option is mutually exclusive with `table-pattern`; configure exactly one of the two. [...] +| table-pattern | String | Yes, if `table-names` is not set | - | Regular expression for tables to monitor. Use the full table identifier in the pattern, for example `column_type_test\\.dbo\\..*`. This option is mutually exclusive with `table-names`; configure exactly one of the two. [...] | table-names-config | List | No | - | Table config list. for example: [{"table": "db1.schema1.table1","primaryKeys": ["key1"],"snapshotSplitColumn": "key2"}]. The snapshotSplitColumn option must be configured with a unique key. If a non-unique column is provided, the configuration is ignored and SeaTunnel automatically selects an appropriate split column internally. [...] | url | String | Yes | - | Empty or whitespace-only values are rejected during configuration validation. Nonblank values are not trimmed. URL has to be with database, like "jdbc:sqlserver://localhost:1433;databaseName=test". SQL Server JDBC connection properties in this URL, such as `encrypt` and `trustServerCertificate`, are forwarded to the CDC connection. An explicitly configured property in `debezium`, such as `database.trustServerCe [...] | startup.mode | Enum | No | INITIAL | Optional startup mode for SqlServer CDC consumer. Valid values are `initial`, `earliest`, `latest`, and `timestamp`.<br/>`initial`: read the table snapshot first and then continue with incremental changes.<br/>`earliest`: start from the earliest available CDC LSN.<br/>`latest`: only read changes after the job starts.<br/>`timestamp`: start from the LSN resolved from `startup.timestamp`. [...] @@ -323,8 +323,11 @@ source { ### Heartbeat action -Use the `debezium.heartbeat.action.query` option to keep the CDC slot active when there are no upstream changes for a -long time. Pair it with `debezium.heartbeat.interval.ms` so the action runs at a regular cadence. +Use the `debezium.heartbeat.action.query` option to keep offsets and change events flowing during idle periods when +there are no upstream changes for a long time. Pair it with `debezium.heartbeat.interval.ms` so the action runs at a +regular cadence. SQL Server CDC has no replication slot for a heartbeat to keep alive, and heartbeat writes do not pin +the LSN range a consumer needs; the heartbeat does not replace a suitable change-table retention setting and lag +monitoring. ```hocon source { @@ -343,8 +346,10 @@ source { } ``` -The heartbeat table and insert statement must exist on the target database. Without a heartbeat, the LSN window may be -recycled by SQL Server when there is no activity, which can break resumable streaming jobs. +The heartbeat query runs on the source database connection, so the heartbeat table and the INSERT permission for it +must exist on the source database. Heartbeat writes do not delay change-table cleanup, which is retention based; +if a job falls behind by more than the retention period, the LSN range it needs may already have been cleaned up, +which can break resumable streaming jobs. ### Schema change event filtering diff --git a/docs/en/connectors/source/TDengine.md b/docs/en/connectors/source/TDengine.md index 532f612043..e01c7d5276 100644 --- a/docs/en/connectors/source/TDengine.md +++ b/docs/en/connectors/source/TDengine.md @@ -95,13 +95,15 @@ TDengine-compatible timestamp string, for example `2018-10-03 14:38:16.801`. ### read_columns [List] A list of column names to read. If it is not configured, all columns are read. -When reading from a super table, put TAGS columns at the end of the list. Do not -include `subtable_name`; the connector adds it automatically as the first output -field. - -The order of `read_columns` decides the output field order after -`subtable_name`. If the result is written to a TDengine sink, keep normal columns -before TAGS columns so the sink can split column values and TAGS values +Do not include `subtable_name`; the connector adds it automatically as the first +output field. + +`read_columns` only selects which columns are read; the order of the list does +not affect the output. The output field order always follows the definition +order of the target super table (the order returned by +`desc <database>.<stable>`): normal columns first, then TAGS columns. If the +result is written to a TDengine sink, keep normal columns before TAGS columns in +the super table definition so the sink can split column values and TAGS values correctly. ### common options @@ -115,9 +117,9 @@ All required string options listed above must contain a nonblank value (not empt The output table always starts with the reserved `subtable_name` column, which carries the TDengine sub table name each row came from. Subsequent columns are -the columns declared in `read_columns` (or all columns when `read_columns` is -unset), in the order specified by `read_columns`. TAGS columns follow the -normal columns in the same order you list them. +the selected columns (those listed in `read_columns`, or all columns when +`read_columns` is unset), in the definition order of the target super table: +normal columns first, then TAGS columns. ## Examples diff --git a/docs/en/connectors/source/TiDB-CDC.md b/docs/en/connectors/source/TiDB-CDC.md index d115e01ed1..6b70d3226d 100644 --- a/docs/en/connectors/source/TiDB-CDC.md +++ b/docs/en/connectors/source/TiDB-CDC.md @@ -69,6 +69,7 @@ Please download and put the MySQL driver and `tikv-client-java` in the directory | url | String | Yes | - | MySQL-compatible JDBC URL used to discover table metadata. Example: `jdbc:mysql://tidb0:4000/inventory`. | | driver | String | No | - | JDBC driver class used to discover table metadata, e.g. `com.mysql.cj.jdbc.Driver`. | | username | String | Yes | - | Username used to connect to the TiDB server. | +| driver | String | No | - | JDBC driver class used for table metadata discovery, for example `com.mysql.cj.jdbc.Driver`. The examples in this document set it explicitly. | | password | String | Yes | - | Password used to connect to the TiDB server. | | pd-addresses | String | Yes | - | TiKV placement-driver (PD) endpoints, comma-separated, e.g. `pd0:2379,pd1:2379`. | | database-name | String | Yes | - | Name of the TiDB database to monitor. | diff --git a/docs/en/connectors/source/Vitess-CDC.md b/docs/en/connectors/source/Vitess-CDC.md index 301bc7bd83..cd3a416b5f 100644 --- a/docs/en/connectors/source/Vitess-CDC.md +++ b/docs/en/connectors/source/Vitess-CDC.md @@ -57,6 +57,8 @@ separately. | Name | Type | Required | Default | Description | | --- | --- | --- | --- | --- | | hostname | String | Yes | - | Hostname or IP address of the Vitess VTGate gRPC server. | +| username | String | No | - | Username used by the Vitess VTGate gRPC connection when the cluster enables authentication. | +| password | String | No | - | Password used by the Vitess VTGate gRPC connection when the cluster enables authentication. | | port | Int | No | 15991 | Port of the Vitess VTGate gRPC server. | | keyspace | String | Yes | - | Vitess keyspace captured by the connector. | | schema | Config | Yes* | - | Single-table schema definition. The schema block must provide `table` plus either `columns` or `metadata_table_id`. | diff --git a/docs/zh/connectors/sink/Sls.md b/docs/zh/connectors/sink/Sls.md index 3985bf21d0..961b672a30 100644 --- a/docs/zh/connectors/sink/Sls.md +++ b/docs/zh/connectors/sink/Sls.md @@ -40,6 +40,7 @@ JSON,然后作为 SLS 日志项写入,日志内容的 key 为 `content`。 | access_key_secret | String | 是 | - | 阿里云 AccessKey Secret。值不能为空或仅包含空白字符。 | | source | String | 否 | `SeaTunnel-Source` | 写入 SLS log group 的 source 标记。 | | topic | String | 否 | `SeaTunnel-Topic` | 写入 SLS log group 的 topic 标记。 | +| log_group_size | Int | 否 | 100 | SLS log group 写入大小。预留参数:连接器会读取该选项,但当前实现按每条记录发送一个 log group,该参数暂不生效。 | ## 注意事项 diff --git a/docs/zh/connectors/sink/Snowflake.md b/docs/zh/connectors/sink/Snowflake.md index b4007b5038..e8211ebb6f 100644 --- a/docs/zh/connectors/sink/Snowflake.md +++ b/docs/zh/connectors/sink/Snowflake.md @@ -54,6 +54,8 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | BINARY<br/>VARBINARY | BYTES | | GEOGRAPHY<br/>GEOMETRY | STRING | +当 Sink 自动建表时,`p > 38` 的 SeaTunnel `DECIMAL(p, s)` 列会被收缩为精度 38,小数位按超出量同步缩减。SeaTunnel `BYTES` 列会建为 Snowflake `GEOMETRY`。 + ## 选项 | 名称 | 类型 | 是否必填 | 默认值 | 描述 | @@ -64,7 +66,8 @@ import ChangeLog from '../changelog/connector-jdbc.md'; | username | String | 否 | - | Snowflake 账户用户名。 | | password | String | 否 | - | Snowflake 账户密码。 | | query | String | 否 | - | 写入上游数据的 SQL。优先级高于 `database`/`table` 自动生成的 SQL;设置后会关闭基于目录的优化(无法自动生成 upsert)。 | -| database | String | 否 | - | 数据库名。`generate_sink_sql = true` 时与 `table` 一起用于生成 `INSERT`/upsert SQL;与 `query` 互斥,同时设置时 `query` 优先生。 | +| generate_sink_sql | Boolean | 否 | false | 是否根据 `database`、`table` 和 `primary_keys` 自动生成写入 SQL,而不是使用 `query`。 | +| database | String | 否 | - | 数据库名。`generate_sink_sql = true` 时与 `table` 一起用于生成 `INSERT`/upsert SQL;与 `query` 互斥,同时设置时 `query` 优先。 | | table | String | 否 | - | 目标表名。与 `database` 一起配合 `generate_sink_sql` 生成写入语句。 | | primary_keys | Array | 否 | - | 主键列。`generate_sink_sql = true` 且 `enable_upsert = true` 时用于构建 upsert(insert-or-update)语句。 | | connection_check_timeout_sec | Int | 否 | 30 | 连接校验超时时间(秒)。 | diff --git a/docs/zh/connectors/source/DB2-CDC.md b/docs/zh/connectors/source/DB2-CDC.md index cef88f2819..533a54a758 100644 --- a/docs/zh/connectors/source/DB2-CDC.md +++ b/docs/zh/connectors/source/DB2-CDC.md @@ -87,6 +87,7 @@ Debezium DB2,在初始快照完成后会继续读取已提交的 INSERT、UPDA | chunk-key.even-distribution.factor.upper-bound | Double | 否 | 100 | 用于判断分块键是否均匀分布的上界。 | | chunk-key.even-distribution.factor.lower-bound | Double | 否 | 0.05 | 用于判断分块键是否均匀分布的下界。 | | sample-sharding.threshold | int | 否 | 1000 | 分块键分布不均时触发采样分片策略的估计分片数阈值。 | +| split.allow-sampling | Boolean | 否 | true | 是否启用基于采样的分片策略。设置为 `false` 时将禁用采样分片:分布均匀的分块键仍使用算术分片,分布不均匀的分块键回退到迭代查询方式。 | | inverse-sampling.rate | int | 否 | 1000 | 采样分片策略使用的采样率倒数。 | | exactly_once | Boolean | 否 | false | 启用初始快照切换增量阶段时的精确一次语义。 | | debezium.* | config | 否 | - | 透传给 Debezium DB2 连接器的配置项。 | diff --git a/docs/zh/connectors/source/Milvus.md b/docs/zh/connectors/source/Milvus.md index 800c61f462..9d73791649 100644 --- a/docs/zh/connectors/source/Milvus.md +++ b/docs/zh/connectors/source/Milvus.md @@ -213,7 +213,7 @@ sink { ### 限制读取速度以保护共享集群 当 Milvus 集群同时被其他任务共享时,可以调小 `rate_limit` 和 `batch_size`, -避免 Source 超过集群的 gRPC 消息大小限制。 +避免 Source 超过集群的单集合查询配额(QPS)。 ```bash env { diff --git a/docs/zh/connectors/source/Redis.md b/docs/zh/connectors/source/Redis.md index 6b9768b4e2..4ab25c1633 100644 --- a/docs/zh/connectors/source/Redis.md +++ b/docs/zh/connectors/source/Redis.md @@ -79,7 +79,7 @@ Redis 值。校验成功**不代表**匹配的 key 存在、已存储的值与 ` | hash_key_parse_mode | string | 否 | all | Hash key 解析模式:`all` 或 `kv` | | read_key_enabled | boolean | 否 | false | 是否在输出中包含 Redis key | | key_field_name | string | 否 | - | Redis key 的字段名称 | -| single_field_name | string | 否 | - | 单值类型的字段名称 | +| single_field_name | string | read_key_enabled = true 且为单值类型(string、list、set、zset)时必填 | - | Redis value 的字段名称 | | field_delimiter | string | 否 | ',' | 文本格式的分隔符 | **注意:** 当只读取单表时,请把这些表级参数直接配置在 `Redis` 外层,例如 `keys`、`data_type`、`format`、`schema`,不需要使用 `tables_configs`。 @@ -170,7 +170,7 @@ keys 模式 默认值为 `false`,也就是只读取 value。 -如果读取的是 `string`、`list`、`set`、`zset` 这类单值类型,并且开启了 `read_key_enabled`,必须配置 `single_field_name`,指定 Redis value 写入哪一列。`key_field_name` 是可选项,默认字段名为 `key`。 +单表配置下开启 `read_key_enabled` 时,必须同时配置 `single_field_name`,与 `data_type` 无关。对于 `string`、`list`、`set`、`zset` 这类单值类型,该选项指定 Redis value 写入哪一列,缺失时读取会直接失败。`key_field_name` 是可选项,默认字段名为 `key`。`tables_configs` 中的表级配置不受该校验限制:此时仅单值类型需要配置 `single_field_name`。 配置 schema 时,需要包含实际输出的字段名,包括默认的 `key` 字段或 `key_field_name` 指定的字段名。 @@ -199,9 +199,9 @@ schema { ### single_field_name [string] -读取单值类型并且 `read_key_enabled = true` 时,指定 Redis value 输出到哪一个字段。 +`read_key_enabled = true` 时,指定 Redis value 输出到哪一个字段。 -该选项主要用于 `string`、`list`、`set`、`zset` 这类不能直接映射成多列对象的数据。 +单表配置下,只要 `read_key_enabled = true`,无论 `data_type` 是什么,配置校验都要求该选项必填。对于 `string`、`list`、`set`、`zset` 这类单值类型,该字段就是 value 映射到的 schema 列,缺失时读取会直接失败;对于 `hash` 这类可以直接映射成多列对象的数据,value 字段来自 hash 结构本身,但单表配置校验仍会要求填写该选项。 ### batch_size [int] diff --git a/docs/zh/connectors/source/Snowflake.md b/docs/zh/connectors/source/Snowflake.md index 00492f12b0..f143e86aee 100644 --- a/docs/zh/connectors/source/Snowflake.md +++ b/docs/zh/connectors/source/Snowflake.md @@ -150,7 +150,7 @@ source { - Snowflake 任务使用 `Jdbc` 插件名,并设置 `driver = "net.snowflake.client.jdbc.SnowflakeDriver"`。 - 运行任务前请把 Snowflake JDBC 驱动 jar 放到 `$SEATUNNEL_HOME/plugins/jdbc/lib/`。 - 并行读取时,`partition_column`、`partition_lower_bound`、`partition_upper_bound` 和 `partition_num` 必须描述同一数值列的范围。 -- Snowflake 地理空间列映射为 SeaTunnel `STRING` 类型。 +- Snowflake 的 `GEOGRAPHY`/`GEOMETRY` 列始终映射为 SeaTunnel 的 `STRING` 类型;返回的文本表示形式由 Snowflake JDBC URL 参数(如 `GEOGRAPHY_OUTPUT_FORMAT`)决定。 ## 变更日志 diff --git a/docs/zh/connectors/source/SqlServer-CDC.md b/docs/zh/connectors/source/SqlServer-CDC.md index d97d529d98..1cdf77bb0d 100644 --- a/docs/zh/connectors/source/SqlServer-CDC.md +++ b/docs/zh/connectors/source/SqlServer-CDC.md @@ -26,6 +26,8 @@ import ChangeLog from '../changelog/connector-cdc-sqlserver.md'; Sql Server CDC 连接器允许从 SqlServer 数据库读取快照数据和增量数据。本文档描述了如何设置 Sql Server CDC 连接器来对 SqlServer 数据库运行 SQL 查询。 +当 `startup.mode = initial` 时,连接器会先按并行 split 读取每个被监控表的快照,然后从快照结束时记录的 LSN 切换到增量流式读取。下游应当把快照阶段视为一次性的引导数据,不要依赖它做稳态读取。 + :::tip 在通过 JDBC 元数据发现表列信息时,SeaTunnel 会按精确的 schema/table 标识符对返回结果做二次过滤,以避免混入其他表的列(部分驱动会将 @@ -76,8 +78,8 @@ Sql Server CDC 连接器允许从 SqlServer 数据库读取快照数据和增量 | username | String | 是 | - | 连接 SQL Server 实例时使用的用户名。 | | password | String | 是 | - | 连接数据库服务器时使用的密码。 | | database-names | List | 是 | - | 要监控的数据库名称。 | -| table-names | List | 是 | - | 要监控的表,使用完整表标识:`databaseName.schemaName.tableName`。该参数与 `table-pattern` 互斥。 | -| table-pattern | String | 是 | - | 要监控的表名正则表达式,需要匹配完整表标识,例如 `column_type_test\\.dbo\\..*`。该参数与 `table-names` 互斥。 | +| table-names | List | 未配置 `table-pattern` 时必填 | - | 要监控的表,使用完整表标识:`databaseName.schemaName.tableName`。该参数与 `table-pattern` 互斥,二者只能配置一个。 | +| table-pattern | String | 未配置 `table-names` 时必填 | - | 要监控的表名正则表达式,需要匹配完整表标识,例如 `column_type_test\\.dbo\\..*`。该参数与 `table-names` 互斥,二者只能配置一个。 | | table-names-config | List | 否 | - | 表配置列表。例如:[{"table": "db1.schema1.table1","primaryKeys": ["key1"],"snapshotSplitColumn": "key2"}]。 snapshotSplitColumn 选项必须配置为唯一键(主键或唯一索引)。 如果指定了非唯一列,该配置将被忽略,SeaTunnel 会在内部自动选择合适的拆分列。 | | url | String | 是 | - | 配置校验会拒绝空字符串或仅包含空白字符的值,不会去除非空白值两端的空白字符。URL 必须包含数据库,如 "jdbc:sqlserver://localhost:1433;databaseName=test"。URL 中的 SQL Server JDBC 连接属性(如 `encrypt`、`trustServerCertificate`)会传递给 CDC 连接;`debezium` 中显式配置的属性(如 `database.trustServerCertificate`)优先。 | | startup.mode | Enum | 否 | INITIAL | SqlServer CDC 消费者的可选启动模式,有效值为 `initial`、`earliest`、`latest` 和 `timestamp`。<br/>`initial`:先读取表快照,再继续读取增量变更。<br/>`earliest`:从最早可用的 CDC LSN 开始读取。<br/>`latest`:只读取作业启动后的变更。<br/>`timestamp`:从 `startup.timestamp` 解析出的 LSN 开始读取。 | @@ -314,10 +316,11 @@ source { } ``` -### 心跳动作 +### 心跳(Heartbeat action) -当上游长时间没有变更时,可以使用 `debezium.heartbeat.action.query` 参数让 CDC slot 保持活动状态。请配合 -`debezium.heartbeat.interval.ms` 使用,使该动作按固定节奏执行。 +当上游长时间没有变更时,可以使用 `debezium.heartbeat.action.query` 参数在空闲期间保持 offset 与变更事件继续流动。 +配合 `debezium.heartbeat.interval.ms` 使用,让该动作按固定频率执行。SQL Server CDC 没有 replication slot +可供心跳保活,心跳写入也不会固定消费所需的 LSN 区间,因此心跳不能替代合适的 change table 保留策略与延迟监控。 ```hocon source { @@ -336,8 +339,9 @@ source { } ``` -心跳表和对应的插入语句必须已经存在于目标数据库中。如果没有心跳,在没有活动时 SQL Server 可能会回收 -LSN 窗口,从而导致支持断点恢复的流式作业中断。 +心跳查询在源数据库连接上执行,因此心跳表及相应的 INSERT 权限必须存在于源数据库中。心跳写入不会延缓基于 +保留策略的 change table 清理;若作业落后超过保留期限,其所需的 LSN 区间可能已被清理, +导致可恢复的流式作业中断。 ### Schema change 事件过滤 diff --git a/docs/zh/connectors/source/TDengine.md b/docs/zh/connectors/source/TDengine.md index 99ef12f513..932032ed61 100644 --- a/docs/zh/connectors/source/TDengine.md +++ b/docs/zh/connectors/source/TDengine.md @@ -82,9 +82,9 @@ TDengine 子表名称列表。不配置时读取该超级表下的所有子表 ### read_columns [List] -要读取的列名列表。不配置时读取所有列。读取超级表时,请将 TAGS 字段放在列表末尾。不要在这里配置 `subtable_name`,连接器会自动把它作为第一列输出。 +要读取的列名列表。不配置时读取所有列。不要在这里配置 `subtable_name`,连接器会自动把它作为第一列输出。 -`read_columns` 的顺序会决定 `subtable_name` 之后的输出字段顺序。如果后续继续写入 TDengine Sink,请保持普通列在前、TAGS 字段在后,这样 Sink 才能正确区分普通列和 TAGS 值。 +`read_columns` 只负责筛选要读取的列,列表顺序不影响输出。输出字段顺序始终遵循目标超级表的定义顺序(即 `desc <database>.<stable>` 返回的顺序):普通列在前,TAGS 列在后。如果后续继续写入 TDengine Sink,请保持超级表定义中普通列在前、TAGS 列在后,这样 Sink 才能正确区分普通列和 TAGS 值。 ### 通用选项 @@ -94,7 +94,7 @@ Source 插件通用参数,请参考 [Source Common Options](../common-options/ ## 输出 Schema -输出表的第一列固定为预留字段 `subtable_name`,用来标识该行来自哪个 TDengine 子表。后续字段为 `read_columns` 中声明的列(未设置时为所有列),顺序与 `read_columns` 保持一致;TAGS 列请按声明的顺序排在普通列之后。 +输出表的第一列固定为预留字段 `subtable_name`,用来标识该行来自哪个 TDengine 子表。后续字段为实际读取的列(`read_columns` 中列出的列,未设置时为所有列),顺序遵循目标超级表的定义顺序:普通列在前,TAGS 列在后。 ## 示例 diff --git a/docs/zh/connectors/source/TiDB-CDC.md b/docs/zh/connectors/source/TiDB-CDC.md index 31d24809a8..d86d101543 100644 --- a/docs/zh/connectors/source/TiDB-CDC.md +++ b/docs/zh/connectors/source/TiDB-CDC.md @@ -69,6 +69,7 @@ TiDB CDC 连接器通过 `tikv-client-java` 客户端与 TiKV 的 Placement Driv | url | String | 是 | - | 用于发现表元数据的 MySQL 兼容 JDBC URL,例如 `jdbc:mysql://tidb0:4000/inventory`。 | | driver | String | 否 | - | 用于发现表元数据的 JDBC 驱动类名,例如 `com.mysql.cj.jdbc.Driver`。 | | username | String | 是 | - | 连接 TiDB 时使用的用户名。 | +| driver | String | 否 | - | 发现表元数据时使用的 JDBC 驱动类名,例如 `com.mysql.cj.jdbc.Driver`。本文档的示例中都显式配置了该参数。 | | password | String | 是 | - | 连接 TiDB 时使用的密码。 | | pd-addresses | String | 是 | - | TiKV Placement Driver(PD)地址,多个用逗号分隔,例如 `pd0:2379,pd1:2379`。 | | database-name | String | 是 | - | 要监控的 TiDB 数据库名。 | diff --git a/docs/zh/connectors/source/Vitess-CDC.md b/docs/zh/connectors/source/Vitess-CDC.md index 6bb6f5dbe2..59e1379a32 100644 --- a/docs/zh/connectors/source/Vitess-CDC.md +++ b/docs/zh/connectors/source/Vitess-CDC.md @@ -55,6 +55,8 @@ JDBC 做验证或示例下游,请额外准备 MySQL JDBC 驱动。 | 名称 | 类型 | 必填 | 默认值 | 描述 | | --- | --- | --- | --- | --- | | hostname | String | 是 | - | Vitess VTGate gRPC 服务的主机名或 IP 地址。 | +| username | String | 否 | - | 当集群开启认证时,Vitess VTGate gRPC 连接使用的用户名。 | +| password | String | 否 | - | 当集群开启认证时,Vitess VTGate gRPC 连接使用的密码。 | | port | Int | 否 | 15991 | Vitess VTGate gRPC 端口。 | | keyspace | String | 是 | - | 当前连接器采集的 Vitess keyspace。 | | schema | Config | 是* | - | 单表 schema 定义。schema 中必须提供 `table`,并且至少提供 `columns` 或 `metadata_table_id` 之一。 |
