Abacn commented on code in PR #40702:
URL: https://github.com/apache/beam/pull/40702#discussion_r4341749318


##########
sdks/java/io/debezium/src/main/java/org/apache/beam/io/debezium/SourceRecordJson.java:
##########
@@ -120,13 +123,19 @@ private Event.Metadata loadMetadata() {
       schema = source.getString("file");
     }
 
+    Map<String, Object> sourceFields = new LinkedHashMap<>();
+    for (Field field : source.schema().fields()) {
+      sourceFields.put(field.name(), source.get(field));
+    }
+
     return new Event.Metadata(
         source.getString("connector"),
         source.getString("version"),
         source.getString("name"),
         source.getString("db"),
         schema,
-        source.getString("table"));
+        source.getString("table"),

Review Comment:
   We can add "table" field. For full source field, consider add a transform 
option that control whether preserve full "source"? We can either
   
   - default it to "true" while in existing IT tests we set it to "false" so no 
need to add custom filter for tests in every SDK
   - default to "false" and testing "true" in one of the test cases



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to