hi everyone, I am facing an issue, so I was using ...
# troubleshooting
s
hi everyone, I am facing an issue, so I was using kafka as a realtime stream data and I want to combine it using upsert with this setting. It causes an error in the segments like server error, The Key value in kafka wasn't the one I want, so I set a different primaryKey in the schema, does it affects the process of upsert?
Copy code
"upsertConfig": {
      "mode": "FULL",
      "metadataTTL": 172800,
      "dropOutOfOrderRecord": false,
      "enableSnapshot": true,
      "deletedKeysTTL": 0,
      "defaultPartialUpsertStrategy": "OVERWRITE",
      "enablePreload": true,
      "consistencyMode": "NONE",
      "upsertViewRefreshIntervalMs": 3000,
      "allowPartialUpsertConsumptionDuringCommit": false,
      "hashFunction": "NONE"
    },
m
Upsert requires data is partitioned on the PK. Also, once a table is created and starts ingesting, changing the PK is considered backward incompatible change
s
what if I delete, the table and then start the ingestion all over again?
m
That works
s
what about the PK in kafka, if that wasn't the one I want, can I change it into a PK I want to choose?
m
Not sure if I follow
s
so this _airbyte_ab_id was the Key on kafka, but I wanted to change it into _airbyte_data.userid once I use upsert in pinot
m
As I mentioned, for upsert to work, data must be partitioned on the PK. If you specify one PK in Pinot, but another one in Kafka, the data won't be partitioned as Pinot expects and upsert won't work
s
ooww I get it now, so if it doesn't match between kafka and pinot, it could cause error?
m
Upsert will not work
s
okay, thanks sirr