You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by ga...@apache.org on 2022/09/19 05:51:55 UTC
[incubator-seatunnel] branch dev updated: [connector-v1][doc]Fix inconsistency between document and code logic (#2776)
This is an automated email from the ASF dual-hosted git repository.
gaojun2048 pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git
The following commit(s) were added to refs/heads/dev by this push:
new cccfa88f7 [connector-v1][doc]Fix inconsistency between document and code logic (#2776)
cccfa88f7 is described below
commit cccfa88f727d9a7103234128efd3946f9dc872ba
Author: Laglangyue <35...@users.noreply.github.com>
AuthorDate: Mon Sep 19 13:51:49 2022 +0800
[connector-v1][doc]Fix inconsistency between document and code logic (#2776)
* fix connector-v1 jdbc doc exception
Co-authored-by: laglangyue <la...@foxmail.com>
---
docs/en/connector/sink/Jdbc.mdx | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/docs/en/connector/sink/Jdbc.mdx b/docs/en/connector/sink/Jdbc.mdx
index 423e42c63..17948b367 100644
--- a/docs/en/connector/sink/Jdbc.mdx
+++ b/docs/en/connector/sink/Jdbc.mdx
@@ -36,7 +36,7 @@ Engine Supported and plugin name
| user | string | yes | - |
| password | string | yes | - |
| dbTable | string | yes | - |
-| saveMode | string | no | error |
+| saveMode | string | no | update |
| useSsl | string | no | false |
| customUpdateStmt | string | no | - |
| duplicateIncs | string | no | - |
@@ -56,7 +56,7 @@ user password
### dbTable [string]
-Source data table name
+Sink table name, if the table does not exist, it will be created.
### saveMode [string]
@@ -74,9 +74,10 @@ The transaction isolation level, which applies to current connection. The defaul
### customUpdateStmt [string]
-Configure when `saveMode` is specified as `update` , which is used to specify the update statement template for key conflicts
-
-Refer to the usage of `INSERT INTO table (...) values (...) ON DUPLICATE KEY UPDATE... ` of `mysql` , use placeholders or fixed values in `values`
+Configure when `saveMode` is specified as `update` , which is used to specify the update statement template for key conflicts.
+If `customUpdateStmt` is empty, the sql will auto-generate for all columns, else use the sql which refer to the usage of
+`INSERT INTO table (...) values (...) ON DUPLICATE KEY UPDATE... ` of `mysql` , use placeholders or fixed values in `values`
+tips: the tableName of sql should be consistent with the `dbTable`.
### duplicateIncs [string]
@@ -187,7 +188,7 @@ jdbc {
user = "userName",
password = "***********",
dbTable = "tableName",
- customUpdateStmt = "INSERT INTO table (column1, column2, created, modified, yn) values(?, ?, now(), now(), 1) ON DUPLICATE KEY UPDATE column1 = IFNULL(VALUES (column1), column1), column2 = IFNULL(VALUES (column2), column2)"
+ customUpdateStmt = "INSERT INTO tableName (column1, column2, created, modified, yn) values(?, ?, now(), now(), 1) ON DUPLICATE KEY UPDATE column1 = IFNULL(VALUES (column1), column1), column2 = IFNULL(VALUES (column2), column2)"
jdbc.connect_timeout = 10000
jdbc.socket_timeout = 10000
}
@@ -209,4 +210,4 @@ JdbcSink {
```
</TabItem>
-</Tabs>
\ No newline at end of file
+</Tabs>