You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by GitBox <gi...@apache.org> on 2022/08/03 02:26:17 UTC

[GitHub] [incubator-seatunnel] melin opened a new issue, #2347: [Feature]JDBC Savemode Supports replace

melin opened a new issue, #2347:
URL: https://github.com/apache/incubator-seatunnel/issues/2347

   ### Search before asking
   
   - [X] I had searched in the [feature](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22Feature%22) and found no similar feature requirement.
   
   
   ### Description
   
   When writing data into a relational database, data duplication needs to be considered. Both mysql and postgres support upsert syntax.
   
   ```
   mysql:
   replace into t(id, update_time) values(1, now()); 
   
   pg:
   INSERT INTO %s (id,name,data_time,remark) VALUES ( ?,?,?,? ) ON CONFLICT (id,name) DO UPDATE SET id=excluded.id,name=excluded.name,data_time=excluded.data_time,remark=excluded.remark   
   ```
   
   
   ### Usage Scenario
   
   _No response_
   
   ### Related issues
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
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


[GitHub] [incubator-seatunnel] kalencaya commented on issue #2347: [Feature]JDBC Savemode Supports replace

Posted by GitBox <gi...@apache.org>.
kalencaya commented on issue #2347:
URL: https://github.com/apache/incubator-seatunnel/issues/2347#issuecomment-1203955578

   You can also refer to #1843.
   It is a flink jdbc connector implementations which supporting `replace` or `insert into xxx on duplicate xxx` grammar for upsert mode. 


-- 
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


[GitHub] [incubator-seatunnel] github-actions[bot] commented on issue #2347: [Feature]JDBC Savemode Supports replace

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #2347:
URL: https://github.com/apache/incubator-seatunnel/issues/2347#issuecomment-1484291812

   This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.


-- 
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


[GitHub] [incubator-seatunnel] Hisoka-X commented on issue #2347: [Feature]JDBC Savemode Supports replace

Posted by GitBox <gi...@apache.org>.
Hisoka-X commented on issue #2347:
URL: https://github.com/apache/incubator-seatunnel/issues/2347#issuecomment-1203802452

   You can use `customUpdateStmt ` in seatunnel spark jdbc sink to fulfill this requirement. Check this https://seatunnel.apache.org/docs/2.1.2/connector/sink/Jdbc#customupdatestmt-string 


-- 
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


[GitHub] [incubator-seatunnel] melin closed issue #2347: [Feature]JDBC Savemode Supports replace

Posted by "melin (via GitHub)" <gi...@apache.org>.
melin closed issue #2347: [Feature]JDBC Savemode Supports replace
URL: https://github.com/apache/incubator-seatunnel/issues/2347


-- 
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