createFinalTable

open override 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.

The generated SQL should throw an exception if the table already exists and replace is false.

Parameters

finalTableSuffix

A suffix to add to the stream name. Useful for full refresh overwrite syncs, where we write the entire sync to a temp table.

replace

If true, will overwrite an existing table. If false, will throw an exception if the table already exists. If you're passing a non-empty prefix, you likely want to set this to true.