TypingDedupingSqlGenerator
Properties
Link copied to clipboard
Whether updateFinalTable actually generates different SQL when useExpensiveSaferCasting is enabled. Some destinations don't have this distinction, and should override this field to false.
Functions
Link copied to clipboard
Link copied to clipboard
abstract fun createFinalTable(stream: DestinationStream, tableName: TableName, columnNameMapping: ColumnNameMapping, finalTableSuffix: String, replace: Boolean): Sql
Generate a SQL statement to create a fresh table to match the given stream.
Link copied to clipboard
abstract fun overwriteFinalTable(stream: DestinationStream, finalTableName: TableName, finalTableSuffix: String): Sql
Drop the previous final table, and rename the new final table to match the old final table.
Link copied to clipboard
open fun prepareTablesForSoftReset(stream: DestinationStream, tableNames: TableNames, columnNameMapping: ColumnNameMapping): Sql
Typically we need to create a soft reset temporary table and clear loaded at values
Link copied to clipboard
abstract fun updateFinalTable(stream: DestinationStream, tableNames: TableNames, columnNameMapping: ColumnNameMapping, finalTableSuffix: String, maxProcessedTimestamp: Instant?, useExpensiveSaferCasting: Boolean): Sql
Generate a SQL statement to copy new data from the raw table into the final table.