You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by "DanielLeens (via GitHub)" <gi...@apache.org> on 2026/07/02 06:00:53 UTC

[I] Improve JDBC docs for mixing primary key placeholders with static keys [seatunnel]

DanielLeens opened a new issue, #11273:
URL: https://github.com/apache/seatunnel/issues/11273

   ## Background
   
   The current JDBC sink documentation explains `primary_keys`, generated sink SQL, and sink option placeholders such as `${primary_key}`. It also documents common JDBC sink behavior around upsert, COPY, and inherited upstream catalog keys.
   
   However, users still ask whether a generated placeholder can be mixed with additional static key names, for example:
   
   ```hocon
   primary_keys = ["${primary_key}", "tenant_id"]
   ```
   
   The current docs show `primary_keys = ["${primary_key}"]`, but do not clearly state whether mixing placeholders and literal column names is supported, how the placeholder expands, or what happens when the expanded key list overlaps with a static key.
   
   ## Goal
   
   Clarify the supported behavior of JDBC sink `primary_keys` when using sink option placeholders together with literal column names.
   
   ## Suggested scope
   
   Please update the relevant English and Chinese docs, most likely:
   
   - `docs/en/introduction/configuration/sink-options-placeholders.md`
   - `docs/zh/introduction/configuration/sink-options-placeholders.md`
   - `docs/en/connectors/sink/Jdbc.md`
   - `docs/zh/connectors/sink/Jdbc.md`
   
   The update should explain:
   
   1. Whether `primary_keys` supports mixing `${primary_key}` with static column names.
   2. Whether `${primary_key}` expands to one or more key columns.
   3. How duplicates should be handled if a static column is already included in the placeholder expansion.
   4. Whether the behavior differs for single-table and multi-table jobs.
   5. A small valid example and, if unsupported, a small invalid example.
   
   ## Acceptance criteria
   
   - The docs give a direct yes/no answer for mixed placeholder + static primary key configuration.
   - The docs include at least one HOCON example.
   - English and Chinese docs are consistent.
   - The documented behavior is verified against the current implementation rather than inferred from examples only.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Docs] Improve JDBC docs for mixing primary key placeholders with static keys [seatunnel]

Posted by "davidzollo (via GitHub)" <gi...@apache.org>.
davidzollo closed issue #11273: [Docs] Improve JDBC docs for mixing primary key placeholders with static keys
URL: https://github.com/apache/seatunnel/issues/11273


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Docs] Improve JDBC docs for mixing primary key placeholders with static keys [seatunnel]

Posted by "DanielLeens (via GitHub)" <gi...@apache.org>.
DanielLeens commented on issue #11273:
URL: https://github.com/apache/seatunnel/issues/11273#issuecomment-4884354030

   Thanks for volunteering on this one.
   
   Your proposed approach is the right one: please verify the current implementation first, then update both the English and Chinese docs so the documented behavior matches the real placeholder expansion path instead of examples only.
   
   A good patch here should answer three points very directly:
   1. whether `${primary_key}` can be mixed with literal key columns
   2. how duplicates are handled after expansion
   3. whether the behavior is the same for single-table and multi-table jobs
   
   Please go ahead and treat this issue as yours to work on. If anything is unclear while verifying the current behavior in code, feel free to ask in the thread.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscribe@seatunnel.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org