执行merge操作时,如何将过程中执行了多少次insert操作和update操作输出在日志中
- Dominant language
- Java
- Stars
- 17.4k
- Forks
- 5.7k
- PR merge metrics
- No merged PRs in 30d
Description
# 背景
基于 Gaussdbwriter 插件,我自己加入了 merge 模式,具体代码如下:

Gaussdb 原生支持 merge 模式,生成对应的 SQL 语句执行即可
# 问题
Gaussdb 原生的 merge 模式其本质还是执行的是 insert 和 update 操作,所以在通过 DataX 调用该模式时,**只知道执行成功了,但是不知道其中执行了多少次 insert 操作,执行了多少次 update 操作,我想将该部分信息统计出来打印在日志中**。(图中 LOG.info 使用的是 slf4j,图中只是将生成的 SQL 输出到日志中,获取不到执行的结果)
**先谢谢各位大佬了**
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the Gaussdbwriter merge implementation shown in the issue and its DataX execution path. Check what result information is available after the generated MERGE SQL runs; done means successful runs log separate insert and update totals rather than only the SQL.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, sql
- Domain
- database
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100