Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[connector-v1][doc]Fix inconsistency between document and code logic #2776

Merged
merged 5 commits into from
Sep 19, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions docs/en/connector/sink/Jdbc.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -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 | - |
Expand All @@ -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]

Expand All @@ -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]

Expand Down Expand Up @@ -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
}
Expand All @@ -209,4 +210,4 @@ JdbcSink {
```

</TabItem>
</Tabs>
</Tabs>