UnionType

data class UnionType(val options: Set<AirbyteType>, val isLegacyUnion: Boolean) : AirbyteType

Constructors

Link copied to clipboard
constructor(options: Set<AirbyteType>, isLegacyUnion: Boolean)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
open val isArray: Boolean = false
Link copied to clipboard
Link copied to clipboard
open val isObject: Boolean = false
Link copied to clipboard

Functions

Link copied to clipboard
open override fun asColumns(): LinkedHashMap<String, FieldType>

This is a hack to handle weird schemas like {type: object, string}. If a stream's top-level schema looks like this, we still want to be able to extract the object properties (i.e. treat it as though the string option didn't exist).

Link copied to clipboard

This matches legacy behavior. Some destinations handle legacy unions by choosing the "best" type from amongst the options. This is... not great, but it would be painful to change.

Link copied to clipboard
Link copied to clipboard

This function exists so that our tests can easily mock a DestinationStream, while still getting a real value for unknownColumnChanges.

Link copied to clipboard