Skip to content

Commit

Permalink
Simplify interface (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
Tang8330 authored Jul 29, 2024
1 parent cad919a commit e202e16
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/destination/dwh.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,16 @@ import (
)

type DataWarehouse interface {
Baseline

// SQL specific commands
Dialect() sqllib.Dialect
Merge(tableData *optimization.TableData) error
Append(tableData *optimization.TableData, useTempTable bool) error
Dedupe(tableID sqllib.TableIdentifier, primaryKeys []string, includeArtieUpdatedAt bool) error
Exec(query string, args ...any) (sql.Result, error)
Query(query string, args ...any) (*sql.Rows, error)
Begin() (*sql.Tx, error)

// Helper functions for merge
IsRetryableError(err error) bool
IdentifierFor(topicConfig kafkalib.TopicConfig, table string) sqllib.TableIdentifier
AdditionalDateFormats() []string
GetTableConfig(tableData *optimization.TableData) (*types.DwhTableConfig, error)
PrepareTemporaryTable(tableData *optimization.TableData, tableConfig *types.DwhTableConfig, tempTableID sqllib.TableIdentifier, additionalSettings types.AdditionalSettings, createTempTable bool) error
Expand Down

0 comments on commit e202e16

Please sign in to comment.