Skip to content

Commit

Permalink
Snowflake merge statement: filter out empty peerdb data (#1708)
Browse files Browse the repository at this point in the history
This prevents NormaliseFlow from erroring when we truncate rows > 16MB
for PG to Snowflake CDC mirrors
  • Loading branch information
Amogh-Bharadwaj authored May 9, 2024
1 parent c6d7b28 commit b80d434
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions flow/connectors/snowflake/snowflake.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ const (
SELECT _PEERDB_UID,_PEERDB_TIMESTAMP,TO_VARIANT(PARSE_JSON(_PEERDB_DATA)) %s,_PEERDB_RECORD_TYPE,
_PEERDB_MATCH_DATA,_PEERDB_BATCH_ID,_PEERDB_UNCHANGED_TOAST_COLUMNS
FROM _PEERDB_INTERNAL.%s WHERE _PEERDB_BATCH_ID = %d AND
_PEERDB_DATA != '' AND
_PEERDB_DESTINATION_TABLE_NAME = ? ), FLATTENED AS
(SELECT _PEERDB_UID,_PEERDB_TIMESTAMP,_PEERDB_RECORD_TYPE,_PEERDB_MATCH_DATA,_PEERDB_BATCH_ID,
_PEERDB_UNCHANGED_TOAST_COLUMNS,%s
Expand Down

0 comments on commit b80d434

Please sign in to comment.