This is an automated email from the ASF dual-hosted git repository.

chl-wxp pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new 7ef38591a5 [Improve][docs] Deprecate JDBC table prefix and suffix 
options (#11176)
7ef38591a5 is described below

commit 7ef38591a5f59d8b681517323240de95b1d60f83
Author: xuepeng <[email protected]>
AuthorDate: Thu Jul 2 11:44:39 2026 +0800

    [Improve][docs] Deprecate JDBC table prefix and suffix options (#11176)
---
 docs/en/connectors/sink/Jdbc.md                        | 12 +++++++++++-
 docs/zh/connectors/sink/Jdbc.md                        | 12 +++++++++++-
 .../seatunnel/jdbc/config/JdbcSinkOptions.java         | 18 +++++++++++++++---
 3 files changed, 37 insertions(+), 5 deletions(-)

diff --git a/docs/en/connectors/sink/Jdbc.md b/docs/en/connectors/sink/Jdbc.md
index dfb1b77a43..4e0d9e6503 100644
--- a/docs/en/connectors/sink/Jdbc.md
+++ b/docs/en/connectors/sink/Jdbc.md
@@ -42,6 +42,8 @@ support `Xa transactions`. You can set `is_exactly_once=true` 
to enable it.
 | dialect                                   | String  | No       | -           
                 | 
 | database                                  | String  | No       | -           
                 |
 | table                                     | String  | No       | -           
                 |
+| tablePrefix                               | String  | No       | -           
                 |
+| tableSuffix                               | String  | No       | -           
                 |
 | primary_keys                              | Array   | No       | -           
                 |
 | connection_check_timeout_sec              | Int     | No       | 30          
                 |
 | max_retries                               | Int     | No       | 0           
                 |
@@ -129,7 +131,7 @@ Use `database` and this `table-name` auto-generate sql and 
receive upstream inpu
 
 This option is mutually exclusive with `query` and has a higher priority.
 
-The table parameter can fill in the name of an unwilling table, which will 
eventually be used as the table name of the creation table, and supports 
variables (`${table_name}`, `${schema_name}`). Replacement rules: 
`${schema_name}` will replace the SCHEMA name passed to the target side, and 
`${table_name}` will replace the name of the table passed to the table at the 
target side.
+The table parameter can fill in the target table name, which will eventually 
be used as the created or written table name, and supports variables 
(`${table_name}`, `${schema_name}`). Replacement rules: `${schema_name}` will 
replace the SCHEMA name passed to the target side, and `${table_name}` will 
replace the table name passed to the target side.
 
 mysql sink for example:
 
@@ -145,6 +147,14 @@ pgsql (Oracle Sqlserver ...) Sink for example:
 
 Tip: If the target database has the concept of SCHEMA, the table parameter 
must be written as `xxx.xxx`
 
+### tablePrefix [string]
+
+Deprecated. Use `table` with table placeholders instead. For example, use 
`table = "prefix_${table_name}_suffix"` instead of configuring `tablePrefix` 
and `tableSuffix`.
+
+### tableSuffix [string]
+
+Deprecated. Use `table` with table placeholders instead. For example, use 
`table = "prefix_${table_name}_suffix"` instead of configuring `tablePrefix` 
and `tableSuffix`.
+
 ### primary_keys [array]
 
 This option is used to support operations such as `insert`, `delete`, and 
`update` when automatically generate sql.
diff --git a/docs/zh/connectors/sink/Jdbc.md b/docs/zh/connectors/sink/Jdbc.md
index 17783d2eaa..34feba66dd 100644
--- a/docs/zh/connectors/sink/Jdbc.md
+++ b/docs/zh/connectors/sink/Jdbc.md
@@ -40,6 +40,8 @@ import ChangeLog from '../changelog/connector-jdbc.md';
 | dialect                                   | String  | 否    | -               
             | 
 | database                                  | String  | 否    | -               
             |
 | table                                     | String  | 否    | -               
             |
+| tablePrefix                               | String  | 否    | -               
             |
+| tableSuffix                               | String  | 否    | -               
             |
 | primary_keys                              | Array   | 否    | -               
             |
 | connection_check_timeout_sec              | Int     | 否    | 30              
             |
 | max_retries                               | Int     | 否    | 0               
             |
@@ -127,7 +129,7 @@ Postgres 9.5及以下版本,请设置为 `postgresLow` 来支持 CDC
 
 此选项与 `query` 选项是互斥的,此选项具有更高的优先级。
 
-table参数可以填入一个任意的表名,这个名字最终会被用作创建表的表名,并且支持变量(`${table_name}`,`${schema_name}`)。
+table 参数可以填入目标表名,这个名字最终会被用作创建或写入的表名,并且支持变量(`${table_name}`,`${schema_name}`)。
 替换规则如下:`${schema_name}` 将替换传递给目标端的 SCHEMA 名称,`${table_name}` 将替换传递给目标端的表名。
 
 mysql 接收器示例:
@@ -144,6 +146,14 @@ pgsql (Oracle Sqlserver ...) 接收器示例:
 
 Tip: 如果目标数据库有 SCHEMA 的概念,则表参数必须写成 `xxx.xxx`
 
+### tablePrefix [string]
+
+已过时。请改用带表占位符的 `table` 参数。例如,使用 `table = "prefix_${table_name}_suffix"` 替代 
`tablePrefix` 和 `tableSuffix`。
+
+### tableSuffix [string]
+
+已过时。请改用带表占位符的 `table` 参数。例如,使用 `table = "prefix_${table_name}_suffix"` 替代 
`tablePrefix` 和 `tableSuffix`。
+
 ### primary_keys [array]
 
 该选项用于辅助生成 insert、delete、update 等 sql 语句。设置了该选项,将会根据该选项生成对应的 sql 语句
diff --git 
a/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/config/JdbcSinkOptions.java
 
b/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/config/JdbcSinkOptions.java
index f77dbf97c7..22c9c4dfc4 100644
--- 
a/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/config/JdbcSinkOptions.java
+++ 
b/seatunnel-connectors-v2/connector-jdbc/src/main/java/org/apache/seatunnel/connectors/seatunnel/jdbc/config/JdbcSinkOptions.java
@@ -141,19 +141,31 @@ public class JdbcSinkOptions extends JdbcCommonOptions {
                     .noDefaultValue()
                     .withDescription("Whether case conversion is required");
 
+    /**
+     * @deprecated Use {@link #TABLE} with table placeholder instead, for 
example {@code table =
+     *     "prefix_${table_name}_suffix"}.
+     */
+    @Deprecated
     public static final Option<String> TABLE_PREFIX =
             Options.key("tablePrefix")
                     .stringType()
                     .noDefaultValue()
                     .withDescription(
-                            "The table prefix name added when the table is 
automatically created");
-
+                            "Deprecated. Use `table` with table placeholder 
instead, for example "
+                                    + "`table = 
\"prefix_${table_name}_suffix\"`.");
+
+    /**
+     * @deprecated Use {@link #TABLE} with table placeholder instead, for 
example {@code table =
+     *     "prefix_${table_name}_suffix"}.
+     */
+    @Deprecated
     public static final Option<String> TABLE_SUFFIX =
             Options.key("tableSuffix")
                     .stringType()
                     .noDefaultValue()
                     .withDescription(
-                            "The table suffix name added when the table is 
automatically created");
+                            "Deprecated. Use `table` with table placeholder 
instead, for example "
+                                    + "`table = 
\"prefix_${table_name}_suffix\"`.");
 
     public static final Option<Boolean> CREATE_INDEX =
             Options.key("create_index")

Reply via email to