Skip to content

Commit

Permalink
modify even on delete
Browse files Browse the repository at this point in the history
  • Loading branch information
iskakaushik committed Nov 14, 2023
1 parent 57d52d0 commit 6a892ce
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions flow/connectors/snowflake/snowflake.go
Original file line number Diff line number Diff line change
Expand Up @@ -1035,6 +1035,9 @@ func (c *SnowflakeConnector) generateAndExecuteMergeStatement(
if normalizeReq.SoftDelete {
colName := normalizeReq.SoftDeleteColName
deletePart = fmt.Sprintf("UPDATE SET %s = TRUE", colName)
if normalizeReq.SyncedAtColName != "" {
deletePart = fmt.Sprintf("%s, %s = CURRENT_TIMESTAMP", deletePart, normalizeReq.SyncedAtColName)
}
}

mergeStatement := fmt.Sprintf(mergeStatementSQL, destinationTableIdentifier, toVariantColumnName,
Expand Down

0 comments on commit 6a892ce

Please sign in to comment.