TableSchemaMapper

Transforms input schema elements to destination-specific naming and type conventions.

Inheritors

Functions

Link copied to clipboard
open fun colsConflict(a: String, b: String): Boolean

Determines if two column names conflict according to destination-specific rules. By default, performs case-insensitive comparison. Override for different conflict detection logic.

Link copied to clipboard
abstract fun toColumnName(name: String): String

Transforms a column name from the input schema to comply with destination naming conventions. This may include handling special characters, case transformations, or length limitations.

Link copied to clipboard
abstract fun toColumnType(fieldType: FieldType): ColumnType

Converts an Airbyte field type to the corresponding destination-specific column type. This handles mapping of data types from Airbyte's type system to the destination database's type system.

Link copied to clipboard

Performs any final transformations on the complete table schema before it's used in the destination. By default, returns the schema unchanged. Override to apply destination-specific schema modifications.

Link copied to clipboard

Converts a stream descriptor to the final destination table name.

Link copied to clipboard
abstract fun toTempTableName(tableName: TableName): TableName

Generates a temporary table name based on the provided final table name. Temporary tables are typically used before data is moved to final tables to avoid data downtime.