AirbyteValueDeepCoercingMapper
class AirbyteValueDeepCoercingMapper(recurseIntoObjects: Boolean, recurseIntoArrays: Boolean, recurseIntoUnions: Boolean) : AirbyteValueIdentityMapper
A mapper which coerces ALL values against the schema. This mapper MUST NOT be called after any mapper that returns non-native-JSON types (date, timestamp, etc.), or any mapper that causes the values to become misaligned with the schema (e.g. AirbyteSchemaNoopMapper + SchemalessValuesToJsonString).
If this mapper is included in a MapperPipeline, it SHOULD be preceded by a MergeUnions mapper. Not including this mapper may result in strange behavior when coercing union types.
This mapper performs common-sense type coercions. For example, it will promote IntegerValue to NumberValue, or parse StringValue to TimestampValue.
Functions
Link copied to clipboard
open override fun map(value: AirbyteValue, schema: AirbyteType, changes: List<Meta.Change>): Pair<AirbyteValue, List<Meta.Change>>
Link copied to clipboard
open override fun mapArray(value: AirbyteValue, schema: ArrayType, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open override fun mapArrayWithoutSchema(value: AirbyteValue, schema: ArrayTypeWithoutSchema, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open override fun mapBoolean(value: AirbyteValue, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open override fun mapDate(value: AirbyteValue, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Time types are only allowed to be strings on the wire, but can be Int/egerValue if passed through TimeStringToInteger.
Link copied to clipboard
fun mapInner(value: AirbyteValue, schema: AirbyteType, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open override fun mapInteger(value: AirbyteValue, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open fun mapNull(context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open override fun mapNumber(value: AirbyteValue, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open override fun mapObject(value: AirbyteValue, schema: ObjectType, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open override fun mapObjectWithEmptySchema(value: AirbyteValue, schema: ObjectTypeWithEmptySchema, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open override fun mapObjectWithoutSchema(value: AirbyteValue, schema: ObjectTypeWithoutSchema, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open override fun mapString(value: AirbyteValue, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open override fun mapTimestampWithoutTimezone(value: AirbyteValue, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open override fun mapTimestampWithTimezone(value: AirbyteValue, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open override fun mapTimeWithoutTimezone(value: AirbyteValue, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open override fun mapTimeWithTimezone(value: AirbyteValue, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open override fun mapUnion(value: AirbyteValue, schema: UnionType, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
open fun mapUnknown(value: AirbyteValue, context: AirbyteValueIdentityMapper.Context): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>
Link copied to clipboard
fun nulledOut(schema: AirbyteType, context: AirbyteValueIdentityMapper.Context, reason: AirbyteRecordMessageMetaChange.Reason = Reason.DESTINATION_SERIALIZATION_ERROR): Pair<AirbyteValue, AirbyteValueIdentityMapper.Context>