iceberg icon indicating copy to clipboard operation
iceberg copied to clipboard

Does kafka connector it support upsert

Open jerryzhujing opened this issue 10 months ago • 3 comments

Query engine

starrocks

Question

I am using io.tabular.iceberg.connect.IcebergSinkConnector to test upsert and it is running well. But use apache version there is no update and lots of duplicates even if enabled upsert-mode.

jerryzhujing avatar Jan 14 '26 02:01 jerryzhujing

hello, i am facing the same issues. im using debezium connector for source. everything works perfectly but still duplicate even with upsert-mode and table iceberg write upsert enabled. below is my setup, i hope it can be solved:

{
  "name": "PI_TEST6",
  "config": {
    "connector.class": "org.apache.iceberg.connect.IcebergSinkConnector",
    "tasks.max": "1",
    "topics": "-",
    "iceberg.catalog.type": "hadoop",
    "iceberg.catalog.warehouse": "/data/iceberg/warehouse",
    "iceberg.tables": "db_testing.testing2",
    "iceberg.tables.upsert-mode-enabled": "true", 
    "iceberg.tables.default-id-columns": "nomor",
    "iceberg.tables.cdc-field": "op",
    "iceberg.tables.cdc.ops.insert": "c",
    "iceberg.tables.cdc.ops.update": "u",
    "iceberg.tables.cdc.ops.delete": "d",
    "iceberg.tables.commit.interval-ms": "5000",
    "transforms": "unwrap",
    "transforms.unwrap.type": "io.debezium.transforms.ExtractNewRecordState",
    "transforms.unwrap.add.fields": "op",
    "transforms.unwrap.drop.tombstones": "true",
    "transforms.unwrap.delete.handling.mode": "rewrite",
    "value.converter": "org.apache.kafka.connect.json.JsonConverter",
    "value.converter.schemas.enable": "true",
    "key.converter": "org.apache.kafka.connect.json.JsonConverter",
    "key.converter.schemas.enable": "true",
    "iceberg.control.topic": "iceberg-control-testing",
    "iceberg.control.group.id": "iceberg-control-group-testing"
  }
}

usually a debezium connector message in a topic - looks like this:

{
 {
  "schema":{ 
      "payload": {
        "before": {...},
        "after": {...},
        "op": "c/u/d",
        "ts_ms": 123456
      }
 }
}

i refer to several website and documentation but cannot find a solutions. i usually use spark cdc for writing to iceberg but currently exploring this approach alternative. please let me know if there is a solution

hwasyui avatar Mar 30 '26 10:03 hwasyui

This issue has been automatically marked as stale because it has been open for 180 days with no activity. It will be closed in next 14 days if no further activity occurs. To permanently prevent this issue from being considered stale, add the label 'not-stale', but commenting on the issue is preferred when possible.

github-actions[bot] avatar Sep 27 '26 00:09 github-actions[bot]

This issue has been closed because it has not received any activity in the last 14 days since being marked as 'stale'

github-actions[bot] avatar Oct 11 '26 00:10 github-actions[bot]