AirbyteValueCoercer

@Singleton
class AirbyteValueCoercer

Utility class to coerce AirbyteValue to specific types. Does not support recursive coercion.

More specifically: This class coerces the output of JsonToAirbyteValue to strongly-typed AirbyteValue. In particular, this class will parse temporal types, and performs some common-sense conversions among numeric types, as well as upcasting any value to StringValue.

Timestamp parsing uses ethlo/itu for fast ISO-8601 parsing with a JDK TemporalQueries fallback for exotic formats. Time parsing uses a single parse + TemporalQueries check. Both avoid exception-as-control-flow.

Constructors

Link copied to clipboard
constructor()

Functions

Link copied to clipboard
fun coerce(value: AirbyteValue, type: AirbyteType, respectLegacyUnions: Boolean = false): AirbyteValue?
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard