-
Enhancement
-
Resolution: Done
-
Minor
-
1.0.0.Final
-
None
A user may innocently specify the ExtractNewRecordState SMT config with spaces after the commas:
… 'transforms.unwrap.add.source.fields'= 'name, db, table, file, pos', …
This causes the SMT to barf with a slightly puzzling error, since the field "db" does exist - but obviously " db" doesn't (leading space).
Caused by: org.apache.kafka.common.config.ConfigException: Source field specified in 'add.source.fields' does not exist: db at io.debezium.transforms.ExtractNewRecordState.makeUpdatedSchema(ExtractNewRecordState.java:212) at io.debezium.transforms.ExtractNewRecordState.lambda$addSourceFields$0(ExtractNewRecordState.java:182)
at java.util.concurrent.ConcurrentMap.computeIfAbsent(ConcurrentMap.java:324) at io.debezium.transforms.ExtractNewRecordState.addSourceFields(ExtractNewRecordState.java:182) at io.debezium.transforms.ExtractNewRecordState.apply(ExtractNewRecordState.java:159)
at org.apache.kafka.connect.runtime.TransformationChain.lambda$apply$0(TransformationChain.java:50) at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndRetry(RetryWithToleranceOperator.java:128) at org.apache.kafka.connect.runtime.errors.RetryWithToleranceOperator.execAndHandleError(RetryWithToleranceOperator.java:162)
... 11 more
Suggestion: SMT should strip any spaces from field name as part of parsing the comma-separated list.
- relates to
-
DBZ-1452 Add ability to insert fields from op field in ExtractNewRecordState SMT
- Closed