Skip to content

Commit 584029d

Browse files
authored
Merge pull request #56 from telefonicaid/update-cnr-and-doc
Update CNR and doc
2 parents 6017c1a + 0d71ce9 commit 584029d

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

CHANGES_NEXT_RELEASE

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
- Update: JDBC upsert now allows updates when `updateIfNewerField` has the same value (`>=` instead of `>`), and skips the freshness check when the field is missing in the incoming record (telefonicaid/kafka-connect-jdbc-postgis#260)
2+
- Upgrade kafka-connect-jdbc for postgis from 10.9.2 to 10.9.3 (#50)

doc/technical_configuration.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -764,6 +764,24 @@ For PostGIS sinks, a batch size of **3000** has proven to be a good default unde
764764

765765
---
766766

767+
## ⏱️ Conditional Upserts with `updateIfNewerField`
768+
769+
For JDBC sinks using `insert.mode=upsert`, the optional parameter:
770+
771+
```json
772+
"updateIfNewerField": "recvtime/timeinstant"
773+
```
774+
775+
prevents existing rows from being updated with older data.
776+
777+
When configured, the connector only performs the update if the incoming value is **greater than or equal to** the value already stored in the database.
778+
779+
If the field specified in `updateIfNewerField` is not present in the incoming record, the upsert is executed normally without applying the freshness check.
780+
781+
This feature is typically used by *lastdata* flows to avoid overwriting newer observations with stale data.
782+
783+
---
784+
767785
## ▶️ Registering Connectors (it will be updated)
768786

769787
From the `sinks/` directory, register each connector using `curl`:
@@ -809,4 +827,4 @@ Check tables in PostGIS or MongoDB after running the corresponding test input.
809827

810828
For complete operational guidance, multi-tenant management, and security best practices, please refer to the **Kafnus main repository**:
811829

812-
- [Advanced Topics](https://github.com/telefonicaid/kafnus/blob/main/doc/03_advanced_topics.md) – security and operational guide.
830+
- [Advanced Topics](https://github.com/telefonicaid/kafnus/blob/main/doc/03_advanced_topics.md) – security and operational guide.

0 commit comments

Comments
 (0)