kafka-connect-jdbc-sink icon indicating copy to clipboard operation
kafka-connect-jdbc-sink copied to clipboard

Addition of MEMORY_TABLE use in write to Db2

Open dzilio opened this issue 1 year ago • 0 comments

Description

Fixes # (issue)

This will allow the sink operator when used with Db2 to be able to use the MEMORY_TABLE function to batch rows in a blob and use that function in a subselect to pass the BLOB to an INSET in JDBC to Db2 LUW for v11.5.9 or higher releases.

The config/jdbc-sink.properties needs to have: insert.function.value=memory_table added to activate using the function for inserts. If not used the Db2 inserts will revert to a simple JDBC insert statement as was in the original sink code.

Type of change

Please delete options that are not relevant.

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • [ ] This change requires a documentation update

How Has This Been Tested?

Checklist

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [ ] I have made corresponding changes to the documentation
  • [ ] My changes generate no new warnings
  • [x] I have added tests that prove my fix is effective or that my feature works
  • [x] New and existing unit tests pass locally with my changes
  • [ ] Any dependent changes have been merged and published in downstream modules

dzilio avatar Apr 30 '24 17:04 dzilio