Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into stable
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Jun 28, 2023
2 parents 41ebb0b + 27787ed commit 774426c
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions flow/connectors/snowflake/qrep_avro_sync.go
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,19 @@ func GenerateMergeCommand(
tempTableName string,
dstTable string,
) (string, error) {
// all cols are acquired from snowflake schema, so let us try to make upsert key cols match the case
// and also the watermark col, then the quoting should be fine
caseMatchedCols := map[string]string{}
for _, col := range allCols {
caseMatchedCols[strings.ToLower(col)] = col
}

for i, col := range upsertKeyCols {
upsertKeyCols[i] = caseMatchedCols[strings.ToLower(col)]
}

watermarkCol = caseMatchedCols[strings.ToLower(watermarkCol)]

upsertKeys := []string{}
partitionKeyCols := []string{}
for _, key := range upsertKeyCols {
Expand Down

0 comments on commit 774426c

Please sign in to comment.