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-13135-e388eaba95109d5af28fb8f5016b3f2728a3fa9b in repository https://gitbox.apache.org/repos/asf/seatunnel.git
commit a7c1ed67e7734a4291f36213d29ea61499aa6831 Author: Jast <[email protected]> AuthorDate: Sat Nov 7 06:40:02 2026 +0000 [Docs] Fix Zeta REST API, checkpoint storage, transform and connector doc inaccuracies verified against source code (#13135) Co-authored-by: zhangshenghang <[email protected]> Co-authored-by: jast <[email protected]> Co-authored-by: multica-agent <[email protected]> --- docs/en/connectors/sink/Hive.md | 3 +- docs/en/connectors/sink/Iceberg.md | 2 + docs/en/connectors/sink/LocalFile.md | 2 - docs/en/connectors/source/Fluss.md | 2 +- docs/en/connectors/source/HdfsFile.md | 18 ++++++++- docs/en/connectors/source/Iceberg.md | 17 ++++++++- docs/en/connectors/source/LocalFile.md | 4 ++ docs/en/engines/zeta/rest-api-v2.md | 4 +- docs/en/engines/zeta/slot-allocation-strategy.md | 4 ++ docs/en/transforms/encrypt.md | 2 +- docs/en/transforms/metadata.md | 2 +- docs/en/transforms/sql.md | 2 +- docs/en/transforms/table-merge.md | 15 +++++--- docs/zh/connectors/sink/HdfsFile.md | 2 +- docs/zh/connectors/sink/Hive.md | 9 ++++- docs/zh/connectors/sink/Iceberg.md | 2 + docs/zh/connectors/sink/IoTDBv2.md | 47 ++++++++++++++++++++++++ docs/zh/connectors/sink/LocalFile.md | 2 +- docs/zh/connectors/source/Fluss.md | 2 +- docs/zh/connectors/source/HdfsFile.md | 2 +- docs/zh/connectors/source/Hive.md | 6 +++ docs/zh/connectors/source/Iceberg.md | 4 +- docs/zh/engines/zeta/checkpoint-storage.md | 2 + docs/zh/engines/zeta/rest-api-v2.md | 2 +- docs/zh/engines/zeta/user-command.md | 4 +- docs/zh/transforms/encrypt.md | 2 +- docs/zh/transforms/metadata.md | 2 +- docs/zh/transforms/sql.md | 2 +- docs/zh/transforms/table-merge.md | 15 +++++--- 29 files changed, 149 insertions(+), 33 deletions(-) diff --git a/docs/en/connectors/sink/Hive.md b/docs/en/connectors/sink/Hive.md index d7895c75ad1..ff1db55c621 100644 --- a/docs/en/connectors/sink/Hive.md +++ b/docs/en/connectors/sink/Hive.md @@ -279,6 +279,7 @@ sink { bucket = "s3a://mybucket" fs.s3a.aws.credentials.provider="com.amazonaws.auth.InstanceProfileCredentialsProvider" } + } } ``` @@ -518,7 +519,7 @@ sink { } ``` -### example 2 +### example 3 We have multiple source table like this: diff --git a/docs/en/connectors/sink/Iceberg.md b/docs/en/connectors/sink/Iceberg.md index 63023844aa4..509194f91b3 100644 --- a/docs/en/connectors/sink/Iceberg.md +++ b/docs/en/connectors/sink/Iceberg.md @@ -46,6 +46,8 @@ libfb303-xxx.jar | SeaTunnel Data type | Iceberg Data type | |---------------------|-------------------| | BOOLEAN | BOOLEAN | +| TINYINT | INTEGER | +| SMALLINT | INTEGER | | INT | INTEGER | | BIGINT | LONG | | FLOAT | FLOAT | diff --git a/docs/en/connectors/sink/LocalFile.md b/docs/en/connectors/sink/LocalFile.md index 2b873017006..b61a2e33f18 100644 --- a/docs/en/connectors/sink/LocalFile.md +++ b/docs/en/connectors/sink/LocalFile.md @@ -343,8 +343,6 @@ LocalFile { file_format_type="excel" filename_time_format="yyyy.MM.dd" is_enable_transaction=true - schema_save_mode=RECREATE_SCHEMA - data_save_mode=DROP_DATA } ``` diff --git a/docs/en/connectors/source/Fluss.md b/docs/en/connectors/source/Fluss.md index 5e421ca1a25..5fddcd365d3 100644 --- a/docs/en/connectors/source/Fluss.md +++ b/docs/en/connectors/source/Fluss.md @@ -88,7 +88,7 @@ Fluss databases or tables. The table schema is read automatically from the Fluss | database | string | yes | - | The Fluss database to read from. | | table | string | yes | - | The Fluss table to read from. | | client.config | map | no | - | Extra Fluss client options passed to the Fluss connection. | -| start_mode | string | no | earliest | The offset each bucket starts reading from: `earliest` (whole log) or `latest` (only records appended after the job starts). `latest` is rejected in `BATCH` mode. | +| start_mode | enum | no | earliest | The offset each bucket starts reading from: `earliest` (whole log) or `latest` (only records appended after the job starts). `latest` is rejected in `BATCH` mode. | | poll.timeout.ms | long | no | 10000 | The maximum time, in milliseconds, to block in a single Fluss log scanner poll. | | common-options | - | no | - | Source common options. See [Source Common Options](../common-options/source-common-options.md). | diff --git a/docs/en/connectors/source/HdfsFile.md b/docs/en/connectors/source/HdfsFile.md index 6be5933f9d4..1837260af25 100644 --- a/docs/en/connectors/source/HdfsFile.md +++ b/docs/en/connectors/source/HdfsFile.md @@ -54,7 +54,7 @@ Read data from hdfs file system. |----------------------------|---------|----------|-----------------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | path | string | yes | - | The source file path. | | tables_configs | list | no | - | Configure multiple HDFS source tables in one source block. Each item has the same options as a single-table `HdfsFile` source, and can set its downstream table name through `schema.table`. | -| file_format_type | string | yes | - | We supported as the following file types:`text` `csv` `parquet` `orc` `json` `excel` `xml` `binary` `markdown` `pdf`.Please note that, The final file name will end with the file_format's suffix, the suffix of the text file is `txt`. | +| file_format_type | string | conditionally yes | - | Required for single-table mode. We supported as the following file types:`text` `csv` `parquet` `orc` `json` `excel` `xml` `binary` `markdown` `pdf`.Please note that, The final file name will end with the file_format's suffix, the suffix of the text file is `txt`. | | fs.defaultFS | string | yes | - | The hadoop cluster address that start with `hdfs://`, for example: `hdfs://hadoopcluster` | | read_columns | list | no | - | The read column list of the data source, user can use it to implement field projection.The file type supported column projection as the following shown:[text,csv,orc,parquet,excel,xml].Tips: If the user wants to use this feature when reading `text` `csv` files, the schema option must be configured. Column projection is not applied to `json` files. | | read_partitions | list | no | - | The partitions that the user wants to read, e.g. `["year=2024"]`. When set, only these partitions are read. | @@ -433,6 +433,22 @@ A single character that encloses CSV fields, allowing fields with commas, line b A single character that allows the quote or other special characters to appear inside a CSV field without ending the field. +### schema [config] + +Required when the file format type is `text`, `json`, `excel`, `xml`, or `csv` (or other formats whose schema cannot be read from metadata). + +The schema information of upstream data. For more details, please refer to [Schema Feature](../../introduction/concepts/schema-feature.md). + +#### metadata_table_id [string] + +The table identifier in the metadata service to fetch table schema. For Gravitino, the format should be `{catalog}.{database}.{table}`, such as `mysql-catalog.test_db.users`. + +When specified, the connector will fetch table schema from the external metadata service instead of using manual `columns` definition. + +> When using Gravitino as the metadata source, the column types from Gravitino will be automatically converted to SeaTunnel data types. For detailed type mapping information, please refer to [Gravitino Type Mapping](../../introduction/concepts/gravitino-type-mapping.md). + +For more information, please refer to [Metadata SPI](../../introduction/concepts/metadata-spi.md). + ### recursive_file_scan [boolean] Whether to scan subdirectories recursively. diff --git a/docs/en/connectors/source/Iceberg.md b/docs/en/connectors/source/Iceberg.md index 67ec88a0580..e27f33232b5 100644 --- a/docs/en/connectors/source/Iceberg.md +++ b/docs/en/connectors/source/Iceberg.md @@ -75,6 +75,8 @@ libfb303-xxx.jar | LIST | ARRAY | | MAP | MAP | +Lists (`LIST`) are only read when the element type is one of `BOOLEAN`, `INT`, `BIGINT`, `FLOAT`, `DOUBLE` or `STRING`; lists with other element types (such as nested structs or decimals) fail the job. + `TIMESTAMP_NS`, `TIMESTAMPTZ_NS` and `UNKNOWN` only exist in format version 3 tables. Nanosecond timestamps keep their nanoseconds and are reported with column scale 9. `VARIANT`, `GEOMETRY` and `GEOGRAPHY` columns are not supported yet and fail the job; leave them out with the `query` option, for example `select id, ts from table`. Rows removed by deletion vectors are not returned. Row lineage fields (`_row_id`, `_last_updated_sequence_number`) are not read. ## Source Options @@ -103,6 +105,19 @@ libfb303-xxx.jar | kerberos_principal | string | no | - | The principal for Kerberos authentication. | | kerberos_keytab_path | string | no | - | The path to the keytab file for Kerberos authentication. | +## Source Option descriptions + +### krb5_path [string] + +The path to the `krb5.conf` file for Kerberos authentication. + +### kerberos_principal [string] + +The principal for Kerberos authentication. + +### kerberos_keytab_path [string] + +The path to the keytab file for Kerberos authentication. ## Task Example @@ -187,7 +202,7 @@ source { ```hocon source { - iceberg { + Iceberg { catalog_name = "seatunnel" iceberg.catalog.config={ "type"="hadoop" diff --git a/docs/en/connectors/source/LocalFile.md b/docs/en/connectors/source/LocalFile.md index 8f6de728ca2..916be525a4b 100644 --- a/docs/en/connectors/source/LocalFile.md +++ b/docs/en/connectors/source/LocalFile.md @@ -656,6 +656,10 @@ When enabled, files will be sorted by their modification time (newest first). Th - Reading files with evolving schemas and you want schema inference to use the latest file - You need to process files in chronological order +### metalake_type [string] + +The type of metalake service, currently supports `gravitino`. + ### common options Source plugin common parameters, please refer to [Source Common Options](../common-options/source-common-options.md) for details diff --git a/docs/en/engines/zeta/rest-api-v2.md b/docs/en/engines/zeta/rest-api-v2.md index e20bbaec5db..09d2d5053f9 100644 --- a/docs/en/engines/zeta/rest-api-v2.md +++ b/docs/en/engines/zeta/rest-api-v2.md @@ -265,7 +265,7 @@ The [OpenAPI 3.1 contract for the read-only REST v2 subset](openapi-v2.yaml) cur ``` **Notes:** -- If you use `dynamic-slot`, the `totalSlot` and `unassignedSlot` always be `0`. when you set it to fix slot number, it will return the correct total and unassigned slot number +- If you use `dynamic-slot`, the `unassignedSlot` is always `0` because dynamic slots are created on demand and never pre-registered; `totalSlot` reflects the number of slots currently assigned to jobs. When you set `dynamic-slot: false` with a fixed slot number, it will return the correct total and unassigned slot number - If the url has tag filter, the `workers`, `totalSlot` and `unassignedSlot` will return the result on the matched worker. but the job related metric will always return the cluster level information. </details> @@ -539,7 +539,7 @@ This endpoint helps troubleshoot why jobs stay in `PENDING` by showing the pendi - **queueSummary** – overview of the entire pending queue. - `size`: number of jobs currently pending. - - `scheduleStrategy`: strategy in use (e.g. `WAIT`, `FAIL_FAST`) that dictates what happens when resources are insufficient. + - `scheduleStrategy`: strategy in use (e.g. `WAIT`, `REJECT`) that dictates what happens when resources are insufficient. - `oldestEnqueueTimestamp` / `newestEnqueueTimestamp`: timestamps (ms) of the oldest/latest job in the queue. - `lackingTaskGroups`: total TaskGroup count still waiting for slots. **Note**: This value reflects only the jobs included in the current response (i.e., the subset limited by the `limit` parameter or filtered by `jobId`), not the entire pending queue. To view the complete statistics for all pending jobs, call this API without the `limit` parameter. - **clusterSnapshot** – cluster resource snapshot (can be filtered by tags). diff --git a/docs/en/engines/zeta/slot-allocation-strategy.md b/docs/en/engines/zeta/slot-allocation-strategy.md index 56ad68d9ea7..995cc7b8ca0 100644 --- a/docs/en/engines/zeta/slot-allocation-strategy.md +++ b/docs/en/engines/zeta/slot-allocation-strategy.md @@ -1,3 +1,7 @@ +--- +sidebar_position: 15 +--- + # Slot Allocation Strategy Slot allocation strategy is an important part of SeaTunnel Engine, which determines how SeaTunnel Engine allocates tasks to different slots. The slot allocation strategy is a configurable component, and users can configure the slot allocation strategy according to their needs. diff --git a/docs/en/transforms/encrypt.md b/docs/en/transforms/encrypt.md index 611f828464c..de63014e217 100644 --- a/docs/en/transforms/encrypt.md +++ b/docs/en/transforms/encrypt.md @@ -10,7 +10,7 @@ The Encrypt transform plugin is used to encrypt or decrypt specified fields in r | name | type | required | default value | description | |--------------------|---------|----------|---------------|--------------------------------------------------| -| `fields` | Array | Yes | - | List of fields to encrypt/decrypt | +| `fields` | Array | Yes | - | List of fields to encrypt/decrypt. All configured fields must be of string type; configuring a non-string field makes the job fail at startup with an unsupported data type error | | `algorithm` | String | No | `AES_GCM` | Encryption algorithm | | `key` | String | Yes | - | Base64-encoded encryption key | | `mode` | String | No | `encrypt` | `encrypt` or `decrypt` | diff --git a/docs/en/transforms/metadata.md b/docs/en/transforms/metadata.md index cf167a1235b..3de28b6d180 100644 --- a/docs/en/transforms/metadata.md +++ b/docs/en/transforms/metadata.md @@ -31,7 +31,7 @@ The Metadata transform plugin is used to extract metadata information from data | BinlogPos | long | Binlog byte offset. `null` for snapshot rows. | MySQL-CDC only | | BinlogRow | int | Row index (0-based) within the binlog event. `null` for snapshot rows. | MySQL-CDC only | | Gtid | string | Global Transaction ID (`server_uuid:transaction_id`). `null` when GTID is disabled or for snapshot rows. | MySQL-CDC only | -| Partition | string | Partition information of the data, multiple partition fields separated by commas | Connectors supporting partitions | +| Partition | declared by the input table's `MetadataSchema` | Partition information of the data. The value is returned as-is from the connector's partition option; no comma joining is applied by the transform. This key is only available when the input table's `MetadataSchema` declares it | Connectors that write partition metadata | ## Connector-Declared Metadata Fields diff --git a/docs/en/transforms/sql.md b/docs/en/transforms/sql.md index be4c6ffff39..abf1d01459e 100644 --- a/docs/en/transforms/sql.md +++ b/docs/en/transforms/sql.md @@ -108,7 +108,7 @@ Then the data in result table `fake1` will update to if your upstream data schema is like this: -```hacon +```hocon source { FakeSource { plugin_output = "fake" diff --git a/docs/en/transforms/table-merge.md b/docs/en/transforms/table-merge.md index 90c66366d0d..f3c06d2bc09 100644 --- a/docs/en/transforms/table-merge.md +++ b/docs/en/transforms/table-merge.md @@ -8,11 +8,16 @@ TableMerge transform plugin for merge sharding-tables. ## Options -| name | type | required | default value | Description | -|:--------:|--------|----------|---------------|---------------------------| -| database | string | no | | Specify new database name | -| schema | string | no | | Specify new schema name | -| table | string | yes | | Specify new table name | +| name | type | required | default value | Description | +|:------------------:|--------|----------|----------------------|------------------------------------------------------------------------------------------------| +| database | string | no | | Specify new database name | +| schema | string | no | | Specify new schema name | +| table | string | conditional | | Required only when `table_transform` is unset or empty; each `table_transform` entry still requires its own `table`. | +| table_match_regex | string | no | `.*` | Regex of the table paths that the transform level rule applies to. | +| table_transform | array | no | `[]` | Per-table rules, see [Multi-Table Transform](transform-multi-table.md). Exact table-path entries take precedence over the regex; an entry with only `table_match_regex` does not instantiate the global rule. | +| rule_match_mode | string | no | `FIRST_MATCH` | How multiple `table_transform` entries with the same `table_path` are evaluated. Omitting it rejects duplicate entries; `FIRST_MATCH` selects the first one. | + +Tables that match neither `table_match_regex` nor a `table_transform` entry are passed through unchanged. In the example below, `source.shop` does not match `source.user_.*`, so it keeps its original name while `source.user_1` and `source.user_2` are merged into `user_db.user_all`. ## Examples diff --git a/docs/zh/connectors/sink/HdfsFile.md b/docs/zh/connectors/sink/HdfsFile.md index 508912258dc..3368643a856 100644 --- a/docs/zh/connectors/sink/HdfsFile.md +++ b/docs/zh/connectors/sink/HdfsFile.md @@ -95,7 +95,7 @@ import ChangeLog from '../changelog/connector-file-hadoop.md'; | schema_save_mode | string | 否 | CREATE_SCHEMA_WHEN_NOT_EXIST | 现有目录处理方式 | | data_save_mode | string | 否 | APPEND_DATA | 现有数据处理方式 | | multi_table_sink_replica | int | 否 | 1 | 多表写入时,每张表对应的 Sink Writer 副本数。 | -| merge_update_event | boolean | 否 | false | 仅当file_format_type为canal_json、debezium_json、maxwell_json. | +| merge_update_event | boolean | 否 | false | 仅当 file_format_type 为 canal_json、debezium_json 或 maxwell_json 时使用。设为 true 时,UPDATE_AFTER 和 UPDATE_BEFORE 事件会合并为 UPDATE 事件数据 | | ### 提示 diff --git a/docs/zh/connectors/sink/Hive.md b/docs/zh/connectors/sink/Hive.md index 90f3a198335..bcb938f8575 100644 --- a/docs/zh/connectors/sink/Hive.md +++ b/docs/zh/connectors/sink/Hive.md @@ -4,6 +4,12 @@ import ChangeLog from '../changelog/connector-hive.md'; > Hive Sink 连接器 +## 支持的引擎 + +> Spark<br/> +> Flink<br/> +> SeaTunnel Zeta<br/> + ## 描述 将数据写入 Hive。 @@ -269,6 +275,7 @@ sink { bucket = "s3a://mybucket" fs.s3a.aws.credentials.provider="com.amazonaws.auth.InstanceProfileCredentialsProvider" } + } } ``` @@ -508,7 +515,7 @@ sink { } ``` -### 示例 2 +### 示例 3 我们有多个源表如下: diff --git a/docs/zh/connectors/sink/Iceberg.md b/docs/zh/connectors/sink/Iceberg.md index a580319b6b9..a42da85c983 100644 --- a/docs/zh/connectors/sink/Iceberg.md +++ b/docs/zh/connectors/sink/Iceberg.md @@ -46,6 +46,8 @@ libfb303-xxx.jar | SeaTunnel 数据类型 | Iceberg 数据类型 | |----------------|------------------| | BOOLEAN | BOOLEAN | +| TINYINT | INTEGER | +| SMALLINT | INTEGER | | INT | INTEGER | | BIGINT | LONG | | FLOAT | FLOAT | diff --git a/docs/zh/connectors/sink/IoTDBv2.md b/docs/zh/connectors/sink/IoTDBv2.md index 06687157788..448374db073 100644 --- a/docs/zh/connectors/sink/IoTDBv2.md +++ b/docs/zh/connectors/sink/IoTDBv2.md @@ -380,6 +380,53 @@ IoTDB> DESC "test_database"."0700HK"; +-----------+---------+-------+ ``` +#### 案例 4:同时组合 TAG、ATTRIBUTE 和 FIELD 列 + +本案例一次性配置全部三类列:TAG 列用于高基数的可过滤元数据,ATTRIBUTE 列用于低基数的画像类元数据,FIELD 列显式指定度量值。要完成一次完整标记的 IoTDB table 写入,这三类都需要配置。 + +```hocon +sink { + IoTDBv2 { + node_urls = ["localhost:6667"] + username = "root" + password = "root" + sql_dialect = "table" + storage_group = "test_database" + key_device = "region" + key_timestamp = "ts" + key_tag_fields = ["tag"] + key_attribute_fields = ["model_id"] + key_measurement_fields = ["status", "arrival_date", "temperature"] + } +} +``` + +IoTDB 的输出数据格式如下: + +```shell +IoTDB> SELECT * FROM "test_database"."0700HK"; ++-----------------------------+----+--------+------+------------+-----------+ +| time| tag|model_id|status|arrival_date|temperature| ++-----------------------------+----+--------+------+------------+-----------+ +|2025-07-30T17:52:34.851+08:00|tag1| id1| true| 2024-11-12| 4.34| +|2025-07-29T17:51:34.851+08:00|tag2| id2| false| 2024-12-01| 5.54| +|2025-07-28T17:50:34.851+08:00|tag3| id3| false| 2024-12-22| 7.34| ++-----------------------------+----+--------+------+------------+-----------+ +``` +```shell +IoTDB> DESC "test_database"."0700HK"; ++-------------+---------+---------+ +| ColumnName| DataType| Category| ++-------------+---------+---------+ +| time|TIMESTAMP| TIME| +| tag| STRING| TAG| +| model_id| STRING|ATTRIBUTE| +| status| BOOLEAN| FIELD| +| arrival_date| DATE| FIELD| +| temperature| DOUBLE| FIELD| ++-------------+---------+---------+ +``` + ## 变更日志 <ChangeLog /> diff --git a/docs/zh/connectors/sink/LocalFile.md b/docs/zh/connectors/sink/LocalFile.md index f50d85fb663..edfdb93ff32 100644 --- a/docs/zh/connectors/sink/LocalFile.md +++ b/docs/zh/connectors/sink/LocalFile.md @@ -90,7 +90,7 @@ import ChangeLog from '../changelog/connector-file-local.md'; | encoding | string | 否 | "UTF-8" | 仅在 file_format_type 为 json,text,csv,xml 时使用 | | schema_save_mode | string | 否 | CREATE_SCHEMA_WHEN_NOT_EXIST | 现有目录处理方式 | | data_save_mode | string | 否 | APPEND_DATA | 现有数据处理方式 | -| merge_update_event | boolean | 否 | false | 仅当file_format_type为canal_json、debezium_json、maxwell_json. | +| merge_update_event | boolean | 否 | false | 仅当 file_format_type 为 canal_json、debezium_json 或 maxwell_json 时使用。设为 true 时,UPDATE_AFTER 和 UPDATE_BEFORE 事件会合并为 UPDATE 事件数据 | | schema_evolution_enabled | boolean | 否 | false | 开启 Schema 演变支持,适用于 CDC 管道。为 true 时,来自上游的 ADD/DROP/RENAME/MODIFY 列事件无需重启作业即可应用到 Sink。不支持 binary 格式。 | ### path [string] diff --git a/docs/zh/connectors/source/Fluss.md b/docs/zh/connectors/source/Fluss.md index 6a465e608a5..9a509a154d0 100644 --- a/docs/zh/connectors/source/Fluss.md +++ b/docs/zh/connectors/source/Fluss.md @@ -70,7 +70,7 @@ Fluss Source 用于在批处理或流处理作业中,从已有的 Fluss 表读 | database | string | 是 | - | 要读取的 Fluss database。 | | table | string | 是 | - | 要读取的 Fluss table。 | | client.config | map | 否 | - | 传递给 Fluss 连接的额外 Fluss 客户端选项。 | -| start_mode | string | 否 | earliest | 每个 bucket 的起始读取位点:`earliest`(整个 log)或 `latest`(仅作业启动后新追加的记录)。`latest` 在 `BATCH` 模式下会被拒绝。 | +| start_mode | enum | 否 | earliest | 每个 bucket 的起始读取位点:`earliest`(整个 log)或 `latest`(仅作业启动后新追加的记录)。`latest` 在 `BATCH` 模式下会被拒绝。 | | poll.timeout.ms | long | 否 | 10000 | 单次 Fluss log scanner poll 的最大阻塞时间,单位毫秒。 | | common-options | - | 否 | - | Source 通用选项,详见 [Source 通用选项](../common-options/source-common-options.md)。 | diff --git a/docs/zh/connectors/source/HdfsFile.md b/docs/zh/connectors/source/HdfsFile.md index 36df7090424..af65b5179be 100644 --- a/docs/zh/connectors/source/HdfsFile.md +++ b/docs/zh/connectors/source/HdfsFile.md @@ -54,7 +54,7 @@ import ChangeLog from '../changelog/connector-file-hadoop.md'; |----------------------------|---------|------|---------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | path | string | 是 | - | 源文件路径。 | | tables_configs | list | 否 | - | 在一个 Source 块中配置多张 HDFS 源表。每一项都使用与单表 `HdfsFile` Source 相同的参数,并可通过 `schema.table` 设置传递给下游的表名。 | -| file_format_type | string | 是 | - | 我们支持以下文件类型:`text` `csv` `parquet` `orc` `json` `excel` `xml` `binary` `markdown` `pdf`。请注意,最终文件名将以文件格式的后缀结束,文本文件的后缀是 `txt`。 | +| file_format_type | string | 视情况而定 | - | 单表模式下必填。我们支持以下文件类型:`text` `csv` `parquet` `orc` `json` `excel` `xml` `binary` `markdown` `pdf`。请注意,最终文件名将以文件格式的后缀结束,文本文件的后缀是 `txt`。 | | fs.defaultFS | string | 是 | - | 以 `hdfs://` 开头的 hadoop 集群地址,例如:`hdfs://hadoopcluster` | | read_columns | list | 否 | - | 数据源的读取列列表,用户可以使用它来实现字段投影。支持列投影的文件类型如下所示:[text,csv,orc,parquet,excel,xml]。提示:如果用户想在读取 `text` `csv` 文件时使用此功能,必须配置 schema 选项。`json` 文件不支持列投影,配置 `read_columns` 不会生效。 | | read_partitions | list | 否 | - | 用户希望读取的分区列表,例如 `["year=2024"]`。设置后仅读取这些分区。 | diff --git a/docs/zh/connectors/source/Hive.md b/docs/zh/connectors/source/Hive.md index f76f24913d1..918ffe48521 100644 --- a/docs/zh/connectors/source/Hive.md +++ b/docs/zh/connectors/source/Hive.md @@ -4,6 +4,12 @@ import ChangeLog from '../changelog/connector-hive.md'; > Hive 源连接器 +## 支持的引擎 + +> Spark<br/> +> Flink<br/> +> SeaTunnel Zeta<br/> + ## 描述 从 Hive 读取数据。连接器通过 Hive Metastore 获取表结构,并读取底层的数据文件。支持的表存储格式为文本、Parquet 和 ORC;文件格式根据 Hive 表的存储格式(`STORED AS`)自动识别,其他存储格式的表会被拒绝。 diff --git a/docs/zh/connectors/source/Iceberg.md b/docs/zh/connectors/source/Iceberg.md index 67ff0e93761..53181a7471e 100644 --- a/docs/zh/connectors/source/Iceberg.md +++ b/docs/zh/connectors/source/Iceberg.md @@ -75,6 +75,8 @@ libfb303-xxx.jar | LIST | ARRAY | | MAP | MAP | +列表(`LIST`)仅在元素类型为 `BOOLEAN`、`INT`、`BIGINT`、`FLOAT`、`DOUBLE` 或 `STRING` 时才能读取;其他元素类型(例如嵌套 STRUCT 或 DECIMAL)的列表会导致作业失败。 + `TIMESTAMP_NS`、`TIMESTAMPTZ_NS` 和 `UNKNOWN` 仅存在于格式版本 3 的表中。纳秒时间戳保留纳秒精度,并以列精度(scale)9 表示。暂不支持 `VARIANT`、`GEOMETRY` 和 `GEOGRAPHY` 列,读取时作业会失败;可通过 `query` 选项排除这些列,例如 `select id, ts from table`。被 deletion vector 删除的行不会被读取。不会读取行血缘(row lineage)字段(`_row_id`、`_last_updated_sequence_number`)。 ## 源选项 @@ -200,7 +202,7 @@ source { ```hocon source { - iceberg { + Iceberg { catalog_name = "seatunnel" iceberg.catalog.config={ "type"="hadoop" diff --git a/docs/zh/engines/zeta/checkpoint-storage.md b/docs/zh/engines/zeta/checkpoint-storage.md index 6bee47ac96d..d5ce8f630e4 100644 --- a/docs/zh/engines/zeta/checkpoint-storage.md +++ b/docs/zh/engines/zeta/checkpoint-storage.md @@ -312,6 +312,8 @@ seatunnel: # 如果您使用kerberos,您可以这样配置: kerberosPrincipal: your-kerberos-principal kerberosKeytabFilePath: your-kerberos-keytab + # 如果您需要hdfs-site配置,您可以这样配置: + hdfs_site_path: /path/to/your/hdfs_site_path ``` 如果HDFS是HA模式,您可以这样配置: diff --git a/docs/zh/engines/zeta/rest-api-v2.md b/docs/zh/engines/zeta/rest-api-v2.md index 32f3bcc565a..30c37f5e2f6 100644 --- a/docs/zh/engines/zeta/rest-api-v2.md +++ b/docs/zh/engines/zeta/rest-api-v2.md @@ -260,7 +260,7 @@ seatunnel: ``` **注意:** -- 当你使用`dynamic-slot`时, 返回结果中的`totalSlot`和`unassignedSlot`将始终为0. 设置为固定的slot值后, 将正确返回集群中总共的slot数量以及未分配的slot数量. +- 当你使用`dynamic-slot`时, 返回结果中的`unassignedSlot`将始终为0, 因为动态slot是按需创建的, 不会预先注册; `totalSlot`反映的是当前已被任务占用的slot数量. 设置`dynamic-slot: false`使用固定slot后, 将正确返回集群中总共的slot数量以及未分配的slot数量. - 当添加标签过滤后, `workers`, `totalSlot`, `unassignedSlot`将返回满足条件的节点的相关指标. 注意`runningJobs`等job相关指标为集群级别结果, 无法根据标签进行过滤. </details> diff --git a/docs/zh/engines/zeta/user-command.md b/docs/zh/engines/zeta/user-command.md index 7a93f5900d1..eaf3847caee 100644 --- a/docs/zh/engines/zeta/user-command.md +++ b/docs/zh/engines/zeta/user-command.md @@ -53,8 +53,8 @@ Usage: seatunnel.sh [options] -l, --list list job status (default: false) --metrics Get job metrics by JobId -n, --name SeaTunnel job name (default: SeaTunnel) - -r, --restore, --restore-job 按 jobId 从最新 Savepoint 恢复 - --restore-with-checkpoint 按 jobId 从最新成功完成的 Checkpoint 恢复 + -r, --restore, --restore-job Restore from the latest savepoint by jobId + --restore-with-checkpoint Restore from the latest completed checkpoint by jobId -s, --savepoint, --savepoint-job savepoint job by jobId --sample-limit Maximum rows forwarded from each source by sample dry-run mode (default: 10, max: 10000) --sample-print-data Print sampled row values to persistent logs (default: false) diff --git a/docs/zh/transforms/encrypt.md b/docs/zh/transforms/encrypt.md index e51a4af9025..390dc93394f 100644 --- a/docs/zh/transforms/encrypt.md +++ b/docs/zh/transforms/encrypt.md @@ -10,7 +10,7 @@ FieldEncrypt 转换插件用于使用对称加密算法,对记录中的指定 | 参数名 | 类型 | 是否必填 | 默认值 | 描述 | |------------------|---------|------|------------|----------------------| -| `fields` | Array | 是 | - | 需要加密或解密的字段列表 | +| `fields` | Array | 是 | - | 需要加密或解密的字段列表。所有配置的字段必须为 string 类型;配置非 string 类型字段会导致作业启动时报不支持的数据类型错误 | | `algorithm` | String | 否 | `AES_GCM` | 加密算法 | | `key` | String | 是 | - | Base64 编码的加密密钥 | | `mode` | String | 否 | `encrypt` | 操作模式:`encrypt` 或 `decrypt` | diff --git a/docs/zh/transforms/metadata.md b/docs/zh/transforms/metadata.md index 9ac2e961e4e..afeec83baad 100644 --- a/docs/zh/transforms/metadata.md +++ b/docs/zh/transforms/metadata.md @@ -31,7 +31,7 @@ Metadata 转换插件用于将数据行中的元数据信息提取为普通字 | BinlogPos | long | Binlog 字节偏移量。快照行返回 `null`。 | 仅 MySQL-CDC | | BinlogRow | int | Binlog 事件中的行索引(从 0 开始)。快照行返回 `null`。 | 仅 MySQL-CDC | | Gtid | string | 全局事务 ID(格式:`server_uuid:transaction_id`)。GTID 未启用或快照行时返回 `null`。 | 仅 MySQL-CDC | -| Partition | string | 数据所属的分区信息,多个分区字段使用逗号分隔 | 支持分区的连接器 | +| Partition | 由输入表的 `MetadataSchema` 声明 | 数据所属的分区信息。值按连接器写入的分区 option 原样返回,transform 不会自动用逗号拼接。该 Key 仅在输入表的 `MetadataSchema` 中显式声明时可用 | 写入分区元数据的连接器 | ## 连接器声明的元数据字段 diff --git a/docs/zh/transforms/sql.md b/docs/zh/transforms/sql.md index 1760ebc0ea2..148f482d72d 100644 --- a/docs/zh/transforms/sql.md +++ b/docs/zh/transforms/sql.md @@ -101,7 +101,7 @@ transform { 例如你的上游数据结构是这样: -```hacon +```hocon source { FakeSource { plugin_output = "fake" diff --git a/docs/zh/transforms/table-merge.md b/docs/zh/transforms/table-merge.md index 04d6aac8d43..00271cb26d6 100644 --- a/docs/zh/transforms/table-merge.md +++ b/docs/zh/transforms/table-merge.md @@ -8,11 +8,16 @@ TableMerge 转换插件用于将分库分表或多张来源表合并为统一输 ## 参数 -| 参数名 | 类型 | 是否必填 | 默认值 | 说明 | -|:--------:|--------|----------|--------|------| -| database | string | 否 | | 合并后新的 database 名称 | -| schema | string | 否 | | 合并后新的 schema 名称 | -| table | string | 是 | | 合并后新的 table 名称 | +| 参数名 | 类型 | 是否必填 | 默认值 | 说明 | +|:------------------:|--------|----------|---------------|-----------------------------------------------------------------------| +| database | string | 否 | | 合并后新的 database 名称 | +| schema | string | 否 | | 合并后新的 schema 名称 | +| table | string | 条件必填 | | 仅在未配置或 `table_transform` 为空时必填;每条 `table_transform` 规则仍需各自配置 `table`。 | +| table_match_regex | string | 否 | `.*` | 匹配表路径的正则表达式,transform 级别的规则只对匹配到的表生效。 | +| table_transform | array | 否 | `[]` | 按表配置的转换规则,参见[多表转换](transform-multi-table.md)。精确表路径条目优先于正则;仅含 `table_match_regex` 的条目不会实例化全局规则。 | +| rule_match_mode | string | 否 | `FIRST_MATCH` | 当多条 `table_transform` 规则的 `table_path` 重复时的匹配方式。不配置时拒绝重复条目;`FIRST_MATCH` 选择第一条匹配。 | + +既没有命中 `table_match_regex`、也没有配置对应 `table_transform` 规则的表将原样透传。在下面的示例中,`source.shop` 不匹配 `source.user_.*`,因此保持原表名不变,而 `source.user_1` 和 `source.user_2` 会被合并为 `user_db.user_all`。 ## 示例
