diff --git a/clients/snowflake/writes.go b/clients/snowflake/writes.go index 84f39f612..f5f48f0b9 100644 --- a/clients/snowflake/writes.go +++ b/clients/snowflake/writes.go @@ -8,7 +8,6 @@ import ( "github.com/artie-labs/transfer/lib/destination/types" "github.com/artie-labs/transfer/lib/logger" "github.com/artie-labs/transfer/lib/optimization" - "github.com/artie-labs/transfer/lib/sql" ) func (s *Store) Append(tableData *optimization.TableData) error { @@ -55,7 +54,7 @@ func (s *Store) Merge(tableData *optimization.TableData) error { var additionalEqualityStrings []string if len(tableData.TopicConfig().AdditionalMergePredicates) > 0 { for _, additionalMergePredicate := range tableData.TopicConfig().AdditionalMergePredicates { - mergePredicateCol := sql.EscapeName(additionalMergePredicate.PartitionField, s.ShouldUppercaseEscapedNames(), s.Label()) + mergePredicateCol := s.Dialect().QuoteIdentifier(additionalMergePredicate.PartitionField) additionalEqualityStrings = append(additionalEqualityStrings, fmt.Sprintf("c.%s = cc.%s", mergePredicateCol, mergePredicateCol)) } } diff --git a/lib/sql/escape.go b/lib/sql/escape.go index 85a94589a..1794da513 100644 --- a/lib/sql/escape.go +++ b/lib/sql/escape.go @@ -25,8 +25,3 @@ func dialectFor(destKind constants.DestinationKind, uppercaseEscNames bool) Dial return DefaultDialect{} } } - -func EscapeName(name string, uppercaseEscNames bool, destKind constants.DestinationKind) string { - // TODO: This is only used in one place, remove once [Dialect] has beem added to [Store]. - return dialectFor(destKind, uppercaseEscNames).QuoteIdentifier(name) -}