diff --git a/src/main/java/com/github/jcustenborder/kafka/connect/transform/common/ExtractNestedField.java b/src/main/java/com/github/jcustenborder/kafka/connect/transform/common/ExtractNestedField.java index acf2d8e..1afca3e 100644 --- a/src/main/java/com/github/jcustenborder/kafka/connect/transform/common/ExtractNestedField.java +++ b/src/main/java/com/github/jcustenborder/kafka/connect/transform/common/ExtractNestedField.java @@ -71,7 +71,7 @@ protected SchemaAndValue processStruct(R record, Schema inputSchema, Struct inpu for (Field inputField : inputSchema.fields()) { builder.field(inputField.name(), inputField.schema()); } - builder.field(this.config.innerFieldName, innerField.schema()); + builder.field(this.config.outputFieldName, innerField.schema()); return builder.build(); }); final Struct outputStruct = new Struct(outputSchema); @@ -80,7 +80,7 @@ protected SchemaAndValue processStruct(R record, Schema inputSchema, Struct inpu outputStruct.put(inputField.name(), value); } final Object innerFieldValue = innerStruct.get(this.config.innerFieldName); - outputStruct.put(this.config.innerFieldName, innerFieldValue); + outputStruct.put(this.config.outputFieldName, innerFieldValue); return new SchemaAndValue(outputSchema, outputStruct);