I am using a 3rd party CDC tool that replicates data from a source database into Kafka topics. An example row is shown below:
{
\"data\":{
\"US
If you're willing to list specific field names, you can solve this by:
rename
to make the field names be what you want the sink to emitwhitelist
to limit the emitted fields to those you selectFor your case it might look like:
"transforms": "t1,t2,t3",
"transforms.t1.type": "org.apache.kafka.connect.transforms.Flatten$Value",
"transforms.t2.type": "org.apache.kafka.connect.transforms.ReplaceField$Value",
"transforms.t2.renames": "data.USER_ID:USER_ID,data.USER_CATEGORY:USER_CATEGORY,headers.operation:operation,headers.timestamp:timestamp",
"transforms.t3.type": "org.apache.kafka.connect.transforms.ReplaceField$Value",
"transforms.t3.whitelist": "USER_ID,USER_CATEGORY,operation,timestamp",