Skip to content

Commit

Permalink
fixing BQ softdel logic pt.1
Browse files Browse the repository at this point in the history
  • Loading branch information
heavycrystal committed Dec 21, 2023
1 parent 7de4309 commit 4cfcbca
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion flow/connectors/bigquery/bigquery.go
Original file line number Diff line number Diff line change
Expand Up @@ -452,7 +452,8 @@ func (c *BigQueryConnector) getTableNametoUnchangedCols(flowJobName string, sync
// Prepare the query to retrieve distinct tables in that batch
query := fmt.Sprintf(`SELECT _peerdb_destination_table_name,
array_agg(DISTINCT _peerdb_unchanged_toast_columns) as unchanged_toast_columns FROM %s.%s
WHERE _peerdb_batch_id > %d and _peerdb_batch_id <= %d GROUP BY _peerdb_destination_table_name`,
WHERE _peerdb_batch_id > %d and _peerdb_batch_id <= %d
AND _peerdb_record_type != 2 GROUP BY _peerdb_destination_table_name`,
c.datasetID, rawTableName, normalizeBatchID, syncBatchID)
// Run the query
q := c.client.Query(query)
Expand Down

0 comments on commit 4cfcbca

Please sign in to comment.