seatunnel icon indicating copy to clipboard operation
seatunnel copied to clipboard

[Umbrella][Docs][Transform-V2] Rewrite the transform plugin documents to the connector documentation standard

Open nzw921rx opened this issue 1 month ago • 39 comments

We need community help to bring the transform plugin documents up to the connector documentation standard: a complete options table, one section per option, the multi-table semantics, runnable examples and English/Chinese kept in sync.

Please comment on this issue to claim one or more documents (one plugin per pull request is preferred).

Background

Connector documents already follow a documented standard (docs/en/connectors/source/Kafka.md, docs/en/connectors/sink/Jdbc.md). Most transform documents are still the early placeholder version — a four column options table and a single example — which causes concrete user-facing problems:

  • the multi-table options table_transform, table_match_regex and rule_match_mode are missing from almost every transform document, although every transform supports them (see docs/en/transforms/transform-multi-table.md);
  • deprecated aliases are not mentioned, for example fields as the fallback of include_fields in Filter;
  • option types, required flags and default values are missing or outdated (compare seatunnel-transforms-v2/src/main/java/.../<Plugin>TransformConfig.java and <Plugin>TransformFactory#optionRule());
  • options that no longer exist are still documented, and newly added options are not documented at all (separators, skip_empty_text, column_rule.sink_type, ...).

Documentation Template

Every rewritten document has to follow this structure, in English and Chinese:

  1. ## Support Those Engines — the engines that really run the plugin (SeaTunnel Zeta / Flink / Spark).
  2. ## Description — what the plugin does and when to use it (3-5 sentences).
  3. ## Key Features — optional, short bullet list.
  4. ## Options — five columns Name | Type | Required | Default | Description, including table_transform, table_match_regex and rule_match_mode when the plugin supports multi-table configuration, plus common options.
  5. One ### <option> [type] section per option: meaning, accepted values, default value, constraints and how it interacts with the other options.
  6. ## Multi-Table Configuration — entries of table_transform take precedence over the transform level rule, every entry has to be a complete single table rule, and when only table_transform is configured the tables without an entry stay unchanged. Add a runnable example.
  7. ## Example — input table, output table and the complete HOCON, ideally covering the three usages (transform level rule only / transform level rule plus per-table rules / per-table rules only).
  8. Option names, types and defaults are copied from the code, and docs/en / docs/zh stay in sync.

The options table and a per-option section look like this:

## Options

| Name              | Type               | Required | Default       | Description                                                                     |
|-------------------|--------------------|----------|---------------|---------------------------------------------------------------------------------|
| include_fields    | Array&lt;String&gt; | no       | -             | Fields to keep. All other fields are removed.                                   |
| exclude_fields    | Array&lt;String&gt; | no       | -             | Fields to remove. All other fields are kept.                                    |
| table_match_regex | String             | no       | `.*`          | Regex of the table paths that the transform level rule applies to.              |
| table_transform   | Array&lt;Map&gt;    | no       | -             | Per-table rules, see [Multi-Table Transform](transform-multi-table.md).          |
| rule_match_mode   | String             | no       | `FIRST_MATCH` | How multiple `table_transform` entries of the same table are evaluated.          |
| common options    | -                  | no       | -             | Transform plugin common parameters, see [Transform Plugin](common-options/common-options.md). |

### include_fields [Array<String>]

The fields to keep, for example `include_fields = [name, card]` keeps only those two fields.

Transforms Open for Claim

Type Transform Document Contributor Status PR
Transform Filter docs/{en,zh}/transforms/filter.md @rdlau01 In review #12816
Transform Copy docs/{en,zh}/transforms/copy.md Todo
Transform FilterRowKind docs/{en,zh}/transforms/filter-rowkind.md Todo
Transform FieldMapper docs/{en,zh}/transforms/field-mapper.md Todo
Transform Replace docs/{en,zh}/transforms/replace.md Todo
Transform Split docs/{en,zh}/transforms/split.md Todo
Transform Metadata docs/{en,zh}/transforms/metadata.md Todo
Transform JsonPath docs/{en,zh}/transforms/jsonpath.md Todo
Transform DataValidator docs/{en,zh}/transforms/data-validator.md Todo
Transform DefineSinkType docs/{en,zh}/transforms/define-sink-type.md Todo
Transform TextChunk docs/{en,zh}/transforms/text-chunk.md Todo
Transform RegexExtract docs/{en,zh}/transforms/regexextract.md Todo
Transform TableMerge docs/{en,zh}/transforms/table-merge.md Todo
Transform FieldEncrypt docs/{en,zh}/transforms/encrypt.md Todo
Transform DynamicCompile docs/{en,zh}/transforms/dynamic-compile.md Todo
Transform Python docs/{en,zh}/transforms/python.md Todo
Transform FieldRename docs/{en,zh}/transforms/field-rename.md Todo
Transform TableRename docs/{en,zh}/transforms/table-rename.md Todo
Transform RowKindExtractor docs/{en,zh}/transforms/rowkind-extractor.md Todo
Transform TableFilter docs/{en,zh}/transforms/table-filter.md Todo
Transform Embedding docs/{en,zh}/transforms/embedding.md Todo
Transform LLM docs/{en,zh}/transforms/llm.md Todo

Note

This issue covers the plugin documents only. The cross-plugin documents overview.md, recipes.md, transform-faq.md, transform-multi-table.md and multi-table-transform-and-join-boundary.md do not follow the plugin template above and are out of scope here; maintainers will handle them separately.

docs/{en,zh}/transforms/sql.md and docs/{en,zh}/transforms/calcite.md are the reference quality level and are excluded from this issue. sql-functions.md, sql-udf.md and calcite-udf.md are already detailed; please open a separate issue if something is missing there.

How to Contribute

  1. Pick a document: choose one row from the table above (one plugin per pull request is preferred).
  2. Claim the task: comment on this issue, for example I would like to work on Filter, and update the Contributor/Status columns if you have permission to edit the issue.
  3. Rewrite both languages: docs/en/... and docs/zh/... in the same pull request, following the documentation format specification for the admonitions (:::tip, :::info, :::caution).
  4. Reference the code: mention the *TransformConfig / *TransformFactory#optionRule() you compared against in the pull request description, so reviewers can verify the option names, types and defaults.
  5. Submit the pull request: open it against dev, use the title [Docs][Transform-V2] <description> and link it back to this issue. Please keep code changes out of the documentation pull request.

Thank you for your contribution.

Code of Conduct

I agree to follow this project's Code of Conduct.

nzw921rx avatar Oct 15 '26 14:10 nzw921rx

Hi, I would like to work on "Filter"

rdlau01 avatar Oct 15 '26 22:10 rdlau01

Hi @nzw921rx, I'd like to take the TableRename documentation task from #12809.

I'll update the English and Chinese documentation, verify option names, types, and defaults against the implementation, and add the required multi-table configuration examples.

I'll keep the contribution focused on TableRename in a single PR.

Is this plugin still available to claim?

med9110 avatar Oct 16 '26 11:10 med9110

Classification: F / Transform-V2 documentation contribution tracking.

The TableRename documentation row is currently unclaimed, and no matching open documentation PR was found. Please proceed with one focused PR covering docs/en and docs/zh for TableRename.

Verify every option name, type, default and constraint against the current TableRename config and factory OptionRule. Include the required multi-table semantics and runnable examples, but keep code changes out of the documentation PR. Link the PR here when it is ready so the tracker table can move the row to review.

DanielLeens avatar Oct 16 '26 14:10 DanielLeens

Hi, I'd like to work on the Copy transform documentation for #12809. I'll update both the English and Chinese pages, check the options against the source code, and submit one documentation-only PR to dev. Please let me know if Copy is still available.

Zlt154 avatar Oct 18 '26 09:10 Zlt154

Thanks for claiming the Copy document. The tracker has now moved beyond the claim: #12859 is open for the Copy EN/ZH rewrite. Please keep all further changes and review discussion on that PR rather than opening a parallel documentation change.

The PR correctly scopes the work to documentation and identifies CopyTransformConfig, CopyFieldTransformFactory#optionRule(), common options, and multi-table behavior as the sources of truth. Its Build is currently action-required, so resolve that CI state before review. Classification: F — Transform-V2 Copy documentation implementation.

DanielLeens avatar Oct 18 '26 12:10 DanielLeens

Hi SeaTunnel team,

I'd like to claim the RowKindExtractor documentation task from #12809.

I'll update both the English and Chinese documentation, verify the supported engines and configuration details against the current Java implementation, and include the required multi-table behavior and runnable examples.

I'll keep the change limited to the two documentation files and submit one focused PR targeting dev.

Could you confirm that RowKindExtractor is still available to claim?

Thank you!

soubhagya-behera avatar Oct 22 '26 15:10 soubhagya-behera

Thanks everyone for stepping up on the Transform-V2 doc rewrite. Here is where things stand:

  • @rdlau01 — Filter: thanks for the interest. I'll confirm its availability in the tracker and follow up here.
  • @med9110 — TableRename: as noted earlier in this thread, the row is unclaimed, so it's yours. Your plan (EN + ZH, verify option names/types/defaults against the implementation, add multi-table examples, one focused PR) is exactly what we want.
  • @Zlt154 — Copy: as noted earlier in this thread, a PR for the Copy EN/ZH rewrite is already open. Please check that PR before starting and keep any further changes and review discussion there rather than opening a parallel one.
  • @soubhagya-behera — RowKindExtractor: thanks for the interest. I'll confirm its availability in the tracker and follow up here. Your approach (verify supported engines and config details against the current Java implementation, EN + ZH, one focused PR to dev) is the right one.

For each page (EN and ZH), please follow the connector documentation standard:

  1. Full five-column options table, with every option verified against the plugin's implementation.
  2. A per-option section describing each option.
  3. Multi-table options and semantics.
  4. Runnable examples that can be pasted into a job config as-is.

Keep each PR documentation-only and scoped to one plugin. Once your PR is up, link it here so I can move your row in the tracker to review.

SEZ9 avatar Oct 23 '26 04:10 SEZ9

Thanks for the guidance, @SEZ9!

I checked PR #12580 and noticed that it already modifies both RowKindExtractor documentation files.

Since my planned contribution is a full English and Chinese rewrite following the connector documentation standard, could you please confirm whether this documentation task is still available and how you'd like me to coordinate with PR #12580?

I'll hold off on editing the documentation until the availability and coordination are clear.

Thank you!

soubhagya-behera avatar Oct 24 '26 06:10 soubhagya-behera

Hi, I'd like to work on the FieldMapper documentation rewrite, covering both EN and ZH pages. I noticed #12423 includes a changelog correction; my scope would focus on the options table, per-option explanations, multi-table behavior, and runnable examples. Is this task still available?

zhzjzz avatar Oct 24 '26 07:10 zhzjzz

For context, #12580 is still my RowKindExtractor fan-out bug fix. Its EN/ZH documentation changes add just one sentence explaining that only the extractor output becomes INSERT and sibling branches keep their original CDC RowKind.

@soubhagya-behera, it does not rewrite the options table, per-option sections or examples. The overlap is that sentence about branch isolation, which should be retained in any rewrite. I'll continue the bug fix and regression coverage in #12580; the full documentation rewrite's allocation and timing still need @SEZ9's confirmation.

AI-generated coordination comment; current PR diff and review checked with Codex assistance.

hutiefang76 avatar Oct 24 '26 07:10 hutiefang76

@hutiefang76 thanks for clarifying the scope. Understood: the open PR stays a RowKindExtractor fan-out bug fix with regression coverage, and its EN/ZH documentation change is limited to the single sentence explaining that only the extractor output becomes INSERT while sibling branches keep their original CDC RowKind.

@soubhagya-behera thanks for holding off until coordination is clear. The allocation and timing of the full RowKindExtractor documentation rewrite are still pending maintainer confirmation, so please wait for that before editing the two documentation files. If the rewrite is assigned to you, please keep it documentation-only, target dev, verify every option name, type, default and constraint against the current implementation, include the multi-table behavior and runnable examples, and retain the branch-isolation sentence from the bug-fix PR so the two changes converge rather than collide.

SEZ9 avatar Oct 25 '26 02:10 SEZ9

Hi, I'd like to claim the FilterRowKind documentation rewrite in this tracker.

I checked the current dev page and FilterRowKindTransformFactory / FilterRowKinkTransformConfig. The page still has a four-column options table and does not explain the factory's table_transform, table_match_regex, or rule_match_mode options. I did not find an existing FilterRowKind claim in this thread or an open PR for this documentation rewrite.

I'll update docs/en/transforms/filter-rowkind.md and docs/zh/transforms/filter-rowkind.md in one documentation-only PR against dev. The scope will cover the full options table, accepted row kinds and nonempty include/exclude rules, per-option explanations, and examples for a transform-level rule, combined transform/per-table rules, and table_transform-only configuration. I'll verify the resolution behavior against the current multi-table implementation and existing tests, and keep the earlier documentation corrections intact.

Please let me know if this scope is already reserved or needs coordination. Thank you!

Nikk8091 avatar Oct 29 '26 17:10 Nikk8091

Thanks for the context, @hutiefang76. Noted that your PR remains the RowKindExtractor fan-out bug fix with regression coverage, and that its EN/ZH documentation change is limited to the single sentence on branch isolation (only the extractor output becomes INSERT; sibling branches keep their original CDC RowKind).

@soubhagya-behera, the overlap with your planned full EN/ZH rewrite is therefore only that sentence, which should be retained in any rewrite. The allocation and timing of the rewrite still need maintainer confirmation, so holding off on the documentation edits as you described is the right call for now. We'll follow up here once that is confirmed.

@Nikk8091, thanks for the detailed FilterRowKind claim. It will be checked against the tracker and any open work, and we'll reply here.

SEZ9 avatar Oct 30 '26 02:10 SEZ9

Hi, I'd also like to claim the TableFilter documentation rewrite as a separate contribution under #12809.

I checked the tracker comments, related PR history, and the current dev page against TableFilterConfig, TableFilterTransformFactory and TableFilterMultiCatalogTransform. I did not find an existing TableFilter documentation claim or a matching open rewrite PR. The page still lacks per-option sections and explanations of the declared multi-table options.

I'll keep this to docs/en/transforms/table-filter.md and docs/zh/transforms/table-filter.md in one documentation-only PR against dev. The scope will cover the options and defaults, how database/schema/table patterns combine, INCLUDE versus EXCLUDE behavior, and complete examples with expected retained tables. I'll verify multi-table selection and output-table behavior against the implementation and tests rather than assume every shared-transform example applies unchanged. Any code defect found during that check will be raised separately.

This is separate from my pending FilterRowKind claim. Please confirm whether TableFilter is available and let me know if coordination is needed. Thank you!

Nikk8091 avatar Nov 02 '26 14:11 Nikk8091

@Nikk8091 thanks for the detailed FilterRowKind claim and for checking the current dev page against FilterRowKindTransformFactory / FilterRowKinkTransformConfig first. I don't see another FilterRowKind claim or an open rewrite PR in this thread either, so please go ahead with that scope.

The plan you outlined matches what we want for this tracker: a single documentation-only PR against dev touching docs/en/transforms/filter-rowkind.md and docs/zh/transforms/filter-rowkind.md, with the full options table (including table_transform, table_match_regex and rule_match_mode), the accepted row kinds and the non-empty include/exclude rule constraint, per-option explanations, and the three example shapes you listed (transform-level rule, combined transform/per-table rules, table_transform-only).

A few concrete asks when you open the PR:

  • Keep the EN and ZH pages in sync (same options, defaults, and examples), and keep the earlier documentation corrections intact as you said.
  • For the multi-table resolution behavior, please describe it as the current implementation and existing tests actually behave, and note in the PR description which tests you checked so reviewers can verify quickly.
  • If you find a mismatch between the code and the intended behavior while doing that check, raise it as a separate issue rather than folding a code change into the doc PR.
  • Link the PR back to this tracker so the claim is visible to others.

Thanks for picking this up!

SEZ9 avatar Nov 03 '26 02:11 SEZ9

Hi, I'd like to claim the Split documentation rewrite in this tracker.

I checked the current dev pages (docs/en/transforms/split.md, docs/zh/transforms/split.md) against SplitTransformConfig, SplitTransformFactory, SplitTransform and SplitMultiCatalogTransform. Both pages are still the four-column placeholder, and I found no existing Split claim in this thread or an open rewrite PR. I also checked the open docs-batch PRs (#13072, #13050, #12986, #12971, #12730, #12459) and none of them touch transforms/split.md.

I'll update the two files in one documentation-only PR against dev:

  • full five-column options table: separator, split_field, output_fields, plus table_match_regex, table_transform, rule_match_mode and common options
  • one section per option, with types, required flags and defaults verified against the factory's optionRule()
  • the edge cases the current page does not document: null split value, fewer parts than output_fields, more parts than output_fields, and the fact that separator is a Java regex passed to String#split
  • a multi-table section covering the transform-level rule and per-table rules
  • runnable examples in both English and Chinese, kept in sync

This will be documentation-only. Any code/doc mismatch I find while verifying the behavior will be raised as a separate issue rather than folded into this PR.

If this is available, please confirm and I'll open the PR and link it here.

Thanks!

lihanyu1715446406-afk avatar Nov 03 '26 14:11 lihanyu1715446406-afk

Opened #13118: rewrite of docs/en/transforms/split.md and docs/zh/transforms/split.md, documentation-only against dev.

lihanyu1715446406-afk avatar Nov 03 '26 14:11 lihanyu1715446406-afk

Opened #13122 for the approved FilterRowKind documentation rewrite.

The PR changes only the EN/ZH FilterRowKind pages. It covers the complete option table, include/exclude constraints, per-table precedence and pass-through behavior, explicit versus omitted rule_match_mode, and three matching full examples in both languages.

The existing factory/shared multi-table suites passed (32 tests), and an in-process check parsed all three examples, validated their factory rules and verified the documented output counts. The PR description lists the implementation and existing IT cases checked, and distinguishes local validation from Docker/engine execution.

Nikk8091 avatar Nov 03 '26 16:11 Nikk8091

Hi, I'd like to claim the Replace documentation rewrite under #12809 as my next documentation task. My FilterRowKind rewrite is submitted in #13122; this would be a separate PR.

I checked dev at 94127692, the tracker comments, related Replace PR history, and the open general documentation-fix PRs. I did not find an existing Replace rewrite claim or an overlapping documentation change in those PRs. The current page still has a four-column options table and omits the shared multi-table options.

I'll keep the change limited to docs/en/transforms/replace.md and docs/zh/transforms/replace.md, with a complete options table, per-option explanations, and complete examples for a transform-level rule, combined transform/per-table rules, and per-table-only configuration. I'll verify the required fields, defaults, legacy replace_field fallback, literal versus regex replacement, and replace_first behavior against ReplaceTransformConfig, ReplaceTransformFactory, ReplaceTransform, and the existing tests. The schema-refresh guidance added by #12365 will be retained.

Both languages will describe the same current behavior and examples. Any implementation defect found during verification will be raised separately. Please confirm whether this scope is available or needs coordination. Thank you!

Nikk8091 avatar Nov 03 '26 16:11 Nikk8091

@Nikk8091 thanks for the detailed TableFilter proposal. I don't see any other TableFilter documentation claim or rewrite PR referenced in this thread, so from the tracker's side the TableFilter rewrite is yours.

The scope you outlined looks right:

  • keep the change to docs/en/transforms/table-filter.md and docs/zh/transforms/table-filter.md in a single documentation-only PR against dev
  • document every option with type/required/default, how the database/schema/table patterns combine, and INCLUDE vs EXCLUDE behavior
  • give complete examples that state the expected retained tables, verified against TableFilterConfig, TableFilterTransformFactory, TableFilterMultiCatalogTransform and the existing tests rather than copied from the shared-transform examples
  • keep EN and ZH in sync describing the same behavior

A couple of concrete asks when you open it:

  1. Link the PR back here so the claim is traceable in this tracker.
  2. In the PR description, list which implementation classes/tests you checked for the multi-table selection and output-table behavior, and distinguish what was validated locally from anything not executed.
  3. If verification turns up any code/doc mismatch, open it as a separate issue (as you proposed) and reference it from the PR rather than folding a fix into the docs change.

No coordination is needed from my side beyond that—go ahead.

SEZ9 avatar Nov 04 '26 02:11 SEZ9