Skip to content

Commit d0c2e26

Browse files
authored
1 parent 2e7ad2c commit d0c2e26

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

plugins/destination/managed_writer.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,11 @@ func (p *Plugin) flush(ctx context.Context, metrics *Metrics, table *schema.Tabl
7272
}
7373

7474
func (p *Plugin) removeDuplicatesByPK(table *schema.Table, resources [][]any) [][]any {
75+
// special case where there's no PK at all
76+
if len(table.PrimaryKeys()) == 0 {
77+
return resources
78+
}
79+
7580
pks := make(map[string]struct{}, len(resources))
7681
res := make([][]any, 0, len(resources))
7782
var reported bool

0 commit comments

Comments
 (0)