Skip to content

Commit 1c2f35a

Browse files
Add: PyFlink session window PK fix
Closes #248
1 parent ab00549 commit 1c2f35a

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
id: e08b9c753f
3+
question: PyFlink session window job fails with 'please declare primary key for sink
4+
table when query contains update/delete record' error
5+
sort_order: 30
6+
---
7+
8+
Session window aggregations produce updates while the session is still open. The JDBC sink needs a primary key so it knows which row should be updated in the table. Without a primary key, Flink cannot apply the updates and the job fails. Define a primary key in the sink table using the window boundaries and the grouping key (for example window_start, window_end, and PULocationID).

0 commit comments

Comments
 (0)