debezium / debezium/dbz

Templated insert statement [DBZ-6380]

Open
#804 0 comments 0 reactions 0 assignees View on GitHub
component/jdbc-connector migrated-from-jira type/enhancement
Dominant language
HTML
Stars
6
Forks
8
Avg merge
2d 19h
Merged PRs (30d)
1

Description

Migrated from [DBZ-6380](https://issues.redhat.com/browse/DBZ-6380)

We could bring more flexibility in the insert, update and delete statement  of the debezium-jdc-sink connector by making the queries that  DefaultTableNamingStrategy class already uses it. As an example it's possible to define the default insert statement to this:
{code:java}
INSERT INTO ${table} (${columnNames}) (${values});{code}
And use can override this statement by it needs, for example using the INSERT IGNORE statement in the MySQL.

Contributor guide

Open the contributing guide

Research direction

Start with the DefaultTableNamingStrategy class in the debezium-jdbc-sink connector and inspect how its insert, update, and delete statements are currently selected. Compare the existing default insert statement with the proposed ${table}, ${columnNames}, and ${values} placeholders, including the MySQL INSERT IGNORE example. Done means these statements can be overridden with the requested templating flexibility.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, mysql
Domain
database
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.