You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Anton Kedin (JIRA)" <ji...@apache.org> on 2019/06/24 18:07:00 UTC

[jira] [Created] (BEAM-7624) Missing field support in JsonToRow

Anton Kedin created BEAM-7624:
---------------------------------

             Summary: Missing field support in JsonToRow
                 Key: BEAM-7624
                 URL: https://issues.apache.org/jira/browse/BEAM-7624
             Project: Beam
          Issue Type: Improvement
          Components: extensions-java-json
            Reporter: Anton Kedin


[JsonToRow|https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/transforms/JsonToRow.java] supports only strict schema matching, so it expects all the fields that are declared by the schema to be present in the input JSON data. If the field is missing, [it crashes|https://github.com/apache/beam/blob/master/sdks/java/core/src/main/java/org/apache/beam/sdk/util/RowJsonDeserializer.java#L114-L117]. In practice it is useful to default to null is such cases. We should make it configurable in Beam Java SDK at least, and probably in Beam SQL (in Pubsub Json TableProvider) as well.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)