Skip to content

Commit

Permalink
explain upsert
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoff committed Mar 10, 2025
1 parent 18b7279 commit e409761
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion content/post/flink-sql-wrangling.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ SHOW CREATE TABLE `measures_with_pk`;
The PK is defined, yes—but I think there are two problems here:

1. `'kafka.retention.time' = '7 d'`: If there's no new data pulled into the source topic (`flood-monitoring-measures`) for a week then the data will age out of this table, and we don't want that (https://docs.confluent.io/cloud/current/flink/reference/sql-examples.html#table-with-infinite-retention-time[ref]).
2. `'changelog.mode' = 'append',` (https://docs.confluent.io/cloud/current/flink/reference/sql-examples.html#create-with-different-changelog-modes[ref])
2. `'changelog.mode' = 'append',` (https://docs.confluent.io/cloud/current/flink/reference/sql-examples.html#create-with-different-changelog-modes[ref]): as this is a dimension table, we don't want to _add_ (append) data to it, but update existing values for a key or insert them if they don't exist—which is what `upsert` does.

Let's try changing these.

Expand Down

0 comments on commit e409761

Please sign in to comment.