Skip to content

Commit

Permalink
-Support for Sink Codecs
Browse files Browse the repository at this point in the history
Signed-off-by: umairofficial <[email protected]>
  • Loading branch information
umairofficial committed Jul 13, 2023
1 parent f81ada8 commit 6fc62ba
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,9 @@ private String buildSchemaStringFromEventMap(final Map<String, Object> eventData
String fields;
int index = 0;
for(final String key: eventData.keySet()){
if(config.getExcludeKeys().contains(key)){
continue;
}
if(index == 0){
if(!(eventData.get(key) instanceof Map)){
fields = "{\"name\":\""+key+"\",\"type\":\""+typeMapper(eventData.get(key))+"\"}";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ public class AvroOutputCodecTest {
private AvroOutputCodec createObjectUnderTest() {
config = new AvroOutputCodecConfig();
config.setSchema(parseSchema().toString());
config.setExcludeKeys(new ArrayList<>());
return new AvroOutputCodec(config);
}

Expand Down

0 comments on commit 6fc62ba

Please sign in to comment.