Class SnowflakeRecordContent


  • public class SnowflakeRecordContent
    extends Object
    • Field Detail

      • NON_AVRO_SCHEMA

        public static int NON_AVRO_SCHEMA
    • Constructor Detail

      • SnowflakeRecordContent

        public SnowflakeRecordContent()
        Constructor for null value.

        If we change this logic in future, we need to carefully modify how we handle tombstone records.

        @see SnowflakeSinkServiceV1#shouldSkipNullValue(SinkRecord)

      • SnowflakeRecordContent

        public SnowflakeRecordContent​(org.apache.kafka.connect.data.Schema schema,
                                      Object data)
        constructor for native json converter
        Parameters:
        schema - schema of the object
        data - object produced by native avro/json converters
      • SnowflakeRecordContent

        public SnowflakeRecordContent​(net.snowflake.client.jdbc.internal.fasterxml.jackson.databind.JsonNode data)
        constructor for json converter
        Parameters:
        data - json node
      • SnowflakeRecordContent

        public SnowflakeRecordContent​(byte[] data)
        constructor for broken record
        Parameters:
        data - broken record
    • Method Detail

      • isBroken

        public boolean isBroken()
        Returns:
        true is record is broken
      • getBrokenData

        public byte[] getBrokenData()
        Returns:
        bytes array represents broken data
      • getData

        public net.snowflake.client.jdbc.internal.fasterxml.jackson.databind.JsonNode[] getData()
      • isRecordContentValueNull

        public boolean isRecordContentValueNull()
        Check if primary reason for this record content's value to be an empty json String, a null value?

        i.e if value passed in by record is empty json node (`{}`), we don't interpret this as null value.

        Returns:
        true if content value is empty json node as well as isNullValueRecord is set to true.