Skip to content

Commit 1bde822

Browse files
jason51553262Jason Separovic
and
Jason Separovic
authored
fix: use outputFieldName instead of innerFieldName for output field (jcustenborder#109)
Co-authored-by: Jason Separovic <[email protected]>
1 parent b780a27 commit 1bde822

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/main/java/com/github/jcustenborder/kafka/connect/transform/common/ExtractNestedField.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ protected SchemaAndValue processStruct(R record, Schema inputSchema, Struct inpu
7171
for (Field inputField : inputSchema.fields()) {
7272
builder.field(inputField.name(), inputField.schema());
7373
}
74-
builder.field(this.config.innerFieldName, innerField.schema());
74+
builder.field(this.config.outputFieldName, innerField.schema());
7575
return builder.build();
7676
});
7777
final Struct outputStruct = new Struct(outputSchema);
@@ -80,7 +80,7 @@ protected SchemaAndValue processStruct(R record, Schema inputSchema, Struct inpu
8080
outputStruct.put(inputField.name(), value);
8181
}
8282
final Object innerFieldValue = innerStruct.get(this.config.innerFieldName);
83-
outputStruct.put(this.config.innerFieldName, innerFieldValue);
83+
outputStruct.put(this.config.outputFieldName, innerFieldValue);
8484

8585
return new SchemaAndValue(outputSchema, outputStruct);
8686

0 commit comments

Comments
 (0)