Class SnowflakeRecordContent
- java.lang.Object
-
- com.snowflake.kafka.connector.records.SnowflakeRecordContent
-
public class SnowflakeRecordContent extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static intNON_AVRO_SCHEMA
-
Constructor Summary
Constructors Constructor Description SnowflakeRecordContent()Constructor for null value.SnowflakeRecordContent(byte[] data)constructor for broken recordSnowflakeRecordContent(net.snowflake.client.jdbc.internal.fasterxml.jackson.databind.JsonNode data)constructor for json converterSnowflakeRecordContent(org.apache.kafka.connect.data.Schema schema, Object data)constructor for native json converter
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description byte[]getBrokenData()net.snowflake.client.jdbc.internal.fasterxml.jackson.databind.JsonNode[]getData()booleanisBroken()booleanisRecordContentValueNull()Check if primary reason for this record content's value to be an empty json String, a null value?
-
-
-
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 objectdata- 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.
-
-