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

DBZ-8024: Fix bug with multiple transforms #66

Merged

Conversation

ryanvanhuuksloot
Copy link
Contributor

@ryanvanhuuksloot ryanvanhuuksloot commented Jul 4, 2024

When you apply multiple transformations, you run into a bug with the operator where the t0,t1 isn't applied like it should be. There is something wrong with String.join(","). Realistically we just need to add a comma between.

Also fixes the incorrect test so we can validate this better moving forward.

Real World Example

1 Transformation ✅

debezium.transforms.t0.negate=true
debezium.transforms.t0.predicate=TopicNameMatches
debezium.transforms.t0.topic.regex=<redacted>
debezium.transforms.t0.topic.replacement=<redacted>
debezium.transforms.t0.type=io.debezium.transforms.ByLogicalTableRouter
debezium.transforms=t0

When you have multiple transformations ❌

debezium.transforms.t0.negate=false
debezium.transforms.t0.predicate=TopicNameMatches
debezium.transforms.t0.type=<custom transform>
debezium.transforms.t1.negate=false
debezium.transforms.t1.predicate=TopicNameMatches
debezium.transforms.t1.regex=<redacted>
debezium.transforms.t1.replacement=<redacted
debezium.transforms.t1.type=org.apache.kafka.connect.transforms.RegexRouter
debezium.transforms.t2.negate=false
debezium.transforms.t2.predicate=TopicNameMatches
debezium.transforms.t2.type=<custom transform>
debezium.transforms.t3.negate=false
debezium.transforms.t3.predicate=TopicNameMatches
debezium.transforms.t3.type=<custom transform>
debezium.transforms=

Note the debezium.transforms is empty in the second example

Copy link

github-actions bot commented Jul 4, 2024

Hi @ryanvanhuuksloot, thanks for your contribution. Please prefix the commit message(s) with the DBZ-xxx JIRA issue key.

@ryanvanhuuksloot
Copy link
Contributor Author

I don't have access to RH Jira yet so for now I'm leaving this with the incorrect DBZ branch structure

@jcechace
Copy link
Member

jcechace commented Jul 5, 2024

@ryanvanhuuksloot LGTM, let me know if I should create the jira or whether you already managed to get an access. Once we can prefix the commit message I will merge it.

@ryanvanhuuksloot ryanvanhuuksloot force-pushed the rvh.fix-multiple-transforms branch from 60dee30 to c692683 Compare July 5, 2024 17:55
@ryanvanhuuksloot
Copy link
Contributor Author

@jcechace Done! Thanks!

@jcechace jcechace merged commit ade4009 into debezium:main Jul 5, 2024
@ryanvanhuuksloot ryanvanhuuksloot deleted the rvh.fix-multiple-transforms branch July 5, 2024 18:12
@ryanvanhuuksloot ryanvanhuuksloot changed the title Fix bug with multiple transforms DBZ-8024: Fix bug with multiple transforms Jul 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants