Class JsonRowDataDeserializationSchema

java.lang.Object
org.apache.flink.formats.json.AbstractJsonDeserializationSchema
org.apache.flink.formats.json.JsonRowDataDeserializationSchema
All Implemented Interfaces:
Serializable, org.apache.flink.api.common.serialization.DeserializationSchema<org.apache.flink.table.data.RowData>, org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.table.data.RowData>

@Internal public class JsonRowDataDeserializationSchema extends AbstractJsonDeserializationSchema
Deserialization schema from JSON to Flink Table/SQL internal data structure RowData.

Deserializes a byte[] message as a JSON object and reads the specified fields.

Failures during deserialization are forwarded as wrapped IOExceptions.

See Also:
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.apache.flink.api.common.serialization.DeserializationSchema

    org.apache.flink.api.common.serialization.DeserializationSchema.InitializationContext
  • Field Summary

    Fields inherited from class org.apache.flink.formats.json.AbstractJsonDeserializationSchema

    failOnMissingField, ignoreParseErrors, objectMapper
  • Constructor Summary

    Constructors
    Constructor
    Description
    JsonRowDataDeserializationSchema(org.apache.flink.table.types.logical.RowType rowType, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> resultTypeInfo, boolean failOnMissingField, boolean ignoreParseErrors, org.apache.flink.formats.common.TimestampFormat timestampFormat)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    org.apache.flink.table.data.RowData
    convertToRowData(org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode message)
     
    org.apache.flink.table.data.RowData
    deserialize(byte[] message)
     
    org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode
    deserializeToJsonNode(byte[] message)
     

    Methods inherited from class org.apache.flink.formats.json.AbstractJsonDeserializationSchema

    equals, getProducedType, hashCode, isEndOfStream, open

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.apache.flink.api.common.serialization.DeserializationSchema

    deserialize
  • Constructor Details

    • JsonRowDataDeserializationSchema

      public JsonRowDataDeserializationSchema(org.apache.flink.table.types.logical.RowType rowType, org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> resultTypeInfo, boolean failOnMissingField, boolean ignoreParseErrors, org.apache.flink.formats.common.TimestampFormat timestampFormat)
  • Method Details

    • deserialize

      public org.apache.flink.table.data.RowData deserialize(@Nullable byte[] message) throws IOException
      Throws:
      IOException
    • deserializeToJsonNode

      public org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode deserializeToJsonNode(byte[] message) throws IOException
      Throws:
      IOException
    • convertToRowData

      public org.apache.flink.table.data.RowData convertToRowData(org.apache.flink.shaded.jackson2.com.fasterxml.jackson.databind.JsonNode message)